bobbybobbertson
Programmer
Can someone tell me how CGI handles uploaded files? Before the uploaded file is used by the perl script, does CGI store the file in memory, a temporary directory, where?
Also, is there a way to stop the upload if it gets too big? I have seen lots of scripts that limit the file size, but the limit happens after the file has been uploaded. In other words, if the limit is set to 1KB and someone uploads a 5MB file, all 5MB of the file is uploaded, then the script tests for the file size, and if it is too big, it deletes it. This is not good, as someone can still upload a really big file and waste server time and space.
Also, what does CGI do if the connection is lost? If someone stops the browser in the middle of uploading, does CGI delete the file? Or does it sit in some temporary directory somewhere?
thanks
Also, is there a way to stop the upload if it gets too big? I have seen lots of scripts that limit the file size, but the limit happens after the file has been uploaded. In other words, if the limit is set to 1KB and someone uploads a 5MB file, all 5MB of the file is uploaded, then the script tests for the file size, and if it is too big, it deletes it. This is not good, as someone can still upload a really big file and waste server time and space.
Also, what does CGI do if the connection is lost? If someone stops the browser in the middle of uploading, does CGI delete the file? Or does it sit in some temporary directory somewhere?
thanks