S
S
sky1997reflection2016-06-14 04:18:38
JavaScript
sky1997reflection, 2016-06-14 04:18:38

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

2 answer(s)
D
Dmitry Kalyuk, 2016-06-14
@kalyukdo

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

Y
yusel, 2016-06-14
@yusel

What file system is worth? Not everyone maintains file integrity.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question