valsaraj 0 Newbie Poster

HI,

My website has an import csv feature. how can I identify that user uploaded a csv file. when I make uploaded csv file from two different systems it shown two separate types like 'application/download' and 'application/octet-stream'. It is confusing. Is there any idea to validate a csv file. file type is varrying.

eg: Array ( [upload_csv] => Array ( [name] => contacts.csv [type] => application/octet-stream [tmp_name] => /tmp/phpSqE0Ww [error] => 0 => 58 ) )