Welcome Guest, Not a member yet? Register   Sign In
Error message is "You did not select a file to upload" but the actual error is that "the file is too big".
#2

[eluser]searain[/eluser]
OK, found the reason. If the file size is greater than post_max_size, then the $_FILES will be empty.
http://www.php.net/manual/en/features.fi....php#57193

In this case, CI upload class would generate a misleading error message "You did not select a file to upload".

Is there anyway that we can extend the Upload class to generate the right error message in the case "the file size is greater than post_max_size"?

Could I use the $_SERVER['CONTENT_LENGTH'] to detect this error?

http://www.php.net/manual/en/features.fi....php#73762

Any chances, CI developer can add this error checking into the Upload library?


Messages In This Thread
Error message is "You did not select a file to upload" but the actual error is that "the file is too big". - by El Forum - 12-07-2010, 12:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB