Hi there...
Goodness, this could be a Newbie question. I read the question quite a few times, but i never found a good answer. Maybe you somebody here can help.
I got a gallery set up with mySQL and PHP4. I want the users to be able to upload images, but of course i want to limit the filesize. That is no problem AFTER the request is sent - i just read $file_size and print an error message.
But if somebody uploads an image that is - say - 4 MB it gets loaded to the temp folder on the server, THEN i check the file size and exit the process.
When i set MAX_FILE_SIZE to a small value, there will be a quite ugly error message, if the file is bigger.
So, is there a possibility to check the file size, BEFORE the file is sent to the server, or at least catch that error message?
Regards,
EvilErnie
Goodness, this could be a Newbie question. I read the question quite a few times, but i never found a good answer. Maybe you somebody here can help.
I got a gallery set up with mySQL and PHP4. I want the users to be able to upload images, but of course i want to limit the filesize. That is no problem AFTER the request is sent - i just read $file_size and print an error message.
But if somebody uploads an image that is - say - 4 MB it gets loaded to the temp folder on the server, THEN i check the file size and exit the process.
When i set MAX_FILE_SIZE to a small value, there will be a quite ugly error message, if the file is bigger.
So, is there a possibility to check the file size, BEFORE the file is sent to the server, or at least catch that error message?
Regards,
EvilErnie