Hi All
I have a script that upload files but for tiff / tif files
i get wrong mime type (using $_FILES['filename']['type']): application/octet-stream instead of
image/tiff or image/tif where is problem.
Thanks in Advance
gyash
Hi All
I have a script that upload files but for tiff / tif files
i get wrong mime type (using $_FILES['filename']['type']): application/octet-stream instead of
image/tiff or image/tif where is problem.
Thanks in Advance
gyash
The problem is probably down to the fact that this information is supplied by the browser and that the machine uploading it has made a decision to class this as a generic filetype. application/octet-stream really just means treat this as a generic binary formatted file.
Unfortunately, you can't always rely on $_FILES['filename']['type'] being set properly anyhow for uploaded files, since this is up to the browser to supply. Your best bet in this case would be to use a system at the server side to check the mime type - if you find one then post ot to this thread.
The most basic check you could perform though would be a simple file extension check.