Cancelling Ajax file upload post to Play

13 views
Skip to first unread message

Edem Nsefik

unread,
Jun 22, 2017, 6:25:55 AM6/22/17
to Play Framework
A client posts a JavaScript Dom File object to play via Ajax to upload a file. If the request is cancelled by the client the global error handler picks up an unexpected request termination. 

I would like to clean up the temporary file from this aborted upload, but when debugging the situation, only stops in the error handler class are being activated. Why would that be?

I am investigating as to whether I could use web-sockets to upload the file and if this would be an easier way to cancel an upload. With web-scokets, would there be any advantage to push the same javaScript Dom File object?
Reply all
Reply to author
Forward
0 new messages