Quantcast

Is there any way to cancel an in-progress HTML5 upload?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Is there any way to cancel an in-progress HTML5 upload?

gstowe

I have a file uploader in my project that handles very large files. Lots of times the users will want to cancel an upload. There does not appear to be any way to make the browser cancel the XHR that is posting the file or files. Consequently, even though the user may close the upload dialog and navigate elsewhere in the app, progress and complete events fire much later and the upload actually completes. Presumably there must be an XHR object embedded in the uploader somewhere that I could call abort on, but I see nothing in the API docs, or in a console dump of the uploader object. Is cancelling an upload possible?
Loading...