Workaround mime type octet

See all posts Reply

Workaround mime type octet new!
by Jean Rumeau, 15 years, 10 months ago
Im playing with the fancyupload and came with this problem i change line 2257 of 0.25

from:
$this->file_src_mime = $file['type'];

to:
$this->file_src_mime = ($imgInfo = @getimagesize($this->file_src_pathname)) ? $imgInfo["mime"] : $file['type'];

so if imagesize can get the mime type we use this or the mime type of the form in case is not an image.

i would like to know if this is a good solution instead of checking the extension to determine the type of file.Reply