Iluvatar+ Posted April 13, 2012 Share Posted April 13, 2012 Is there a diffrent image type refference in php for the file extentions 'jpg' & 'jpeg'. For example i have allowed "image/jpeg" files to be uploaded but only files with the extention .jpg are going through were as .jpeg are not, any idea's? Link to comment https://forums.phpfreaks.com/topic/260853-php-image-type-refference/ Share on other sites More sharing options...
requinix Posted April 13, 2012 Share Posted April 13, 2012 That "image/jpeg" comes from the browser, not from PHP. Besides the fact that it's totally untrustworthy, not all browsers will call an image by the same name. Use a function like getimagesize to independently check (a) that it's an image and (b) what type of image it is. Link to comment https://forums.phpfreaks.com/topic/260853-php-image-type-refference/#findComment-1336958 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.