trouble with image upload
Moderator: General Moderators
trouble with image upload
A few days ago I went through the following tutorial viewtopic.php?t=41743 and it works great. The only problem that I'm having now, is that when using IE and trying to upload a .jpg file, it doesn't work. It works with .gif in IE, and both .gif and .jpg with Firefox, but not .jpg and IE. Does anybody know of any bug out there that I need to fix?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
onion2k's script looks at the submitted mime-type. IE sends image/pjpeg typically for jpeg files. Looking at the mime-type submission is dangerous as that information is very easily forged. Use getimagesize() instead.
Code: Select all
Warning: imagegif(): supplied argument is not a valid Image resource in /productInsert.php on line 26
Warning: imagesx(): supplied argument is not a valid Image resource in /productInsert.php on line 32
Warning: imagesy(): supplied argument is not a valid Image resource in /productInsert.php on line 32
Warning: imagesx(): supplied argument is not a valid Image resource in /productInsert.php on line 41
Warning: imagesy(): supplied argument is not a valid Image resource in /productInsert.php on line 42
Warning: imagecreatetruecolor(): Invalid image dimensions in /productInsert.php on line 45
Warning: imagesx(): supplied argument is not a valid Image resource in /productInsert.php on line 46
Warning: imagesy(): supplied argument is not a valid Image resource in /productInsert.php on line 46
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /productInsert.php on line 46
Warning: imagegif(): supplied argument is not a valid Image resource in /productInsert.php on line 48