I'm using Blueimp jQuery File Upload with chunked uploads to handle large files, and everytime file upload are completed or file are removed, I update the client's disk space used in database.
My problem is: when the upload process is interrupted, I just can delete incomplete file from client-side by using fail
callback to send a DELETE request to server, like this guide : https://github.com/blueimp/jQuery-File-Upload/wiki/Chunked-file-uploads#deleting-aborted-chunked-uploads.
But if clients' internet connections has been lost or the browser is closed, the server will not get any request, there's no update in database too, and the corrupted file still exists. When the client re-connects to the site and remove file, it will cause wrong amount of disk space used in database.
Is there any way to remove imcomplete file of chunked upload from server-side or another solution for my case ? Please help me.