Answer the question
In order to leave comments, you need to log in
How to properly cancel the upload of a file to the server?
The server is written in Express.js using the multer module. I use ng-file-upload to upload files on the client. Files are submitted as multipart/form-data. The problem is that when you cancel the download of a file using .abort() (this function is called in the browser when the button is clicked), the file remains on the server.
Answer the question
In order to leave comments, you need to log in
First of all, the file needs to be uploaded to the temporary space, after a successful upload, the client says which files to save, and the server moves them to permanent storage, cron runs through the temporary storage and cleans the folder
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question