Jump to content

File upload doesnt work on IE


fxuser

Recommended Posts

	if ($btn){
	if((!empty($filename)) && ($error == 0)) {

		if (($filetype == "image/jpeg" || $filetype == "image/jpg" ||
			 $filetype == "image/gif" ||	$filetype == "image/png")
			 && ($filesize < 4508876)) {
				$moving_flag = true;
				$moving_msg = "Your image has been uploaded!";
		} else {
			$upl_error_msg = "Error: Only jpg/gif/png images under 4Mb are accepted for upload";
			$upl_error_flag = true;
		}
	} else {
		$upl_error_msg = "Error: No file uploaded";
		$upl_error_flag = true;
	}
}

 

Why the above code wont work on IE and wont show me "Your image has been uploaded!" message when i have a valid type and size?

 

it works on chrome and FF

Link to comment
https://forums.phpfreaks.com/topic/228473-file-upload-doesnt-work-on-ie/
Share on other sites

PHP executes on the server and doesn't care what browser your using. it's likely your markup that is the issue, not php.

 

well i use ajax to get the file that has the above code plus the html code for the button and file , the gif works on IE but jpg,png wont show me that the image has been uploaded

 

EDIT : ah i knew it was something that had to do with the file type , so jpgs may also be pjpeg and pngs may also be x-png .. gotta check for all the posibilities.

 

fixed!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.