Reply to Workaround mime type octet

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

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important