Question : Any way to abort a web form file upload via Javascript?

Let's say I have a regular HTML web form uploading a large file to my Perl CGI script.

In the web page I have some Ajax - an XMLHttpRequest object that's communicating with my server and displaying a progress bar (I can use mod_perl Apache2::UploadProgress for this).

Now let's say my server reports back at the start of the upload that this file is too big for this user. My question is: Is there any Javascript I can use to stop the browser from continuing to upload the file?

Answer : Any way to abort a web form file upload via Javascript?

have you tried to have the javascript change to a different page?  this should stop the upload.
Random Solutions  
 
programming4us programming4us