multer icon indicating copy to clipboard operation
multer copied to clipboard

File delete issue

Open itsfuad opened this issue 1 year ago • 2 comments

When user is uploading a file, multer stores it on the disk. But if user aborts the upload, the "abort" event is caught but the file cannot be deleted until server is closed.

itsfuad avatar Jun 15 '23 15:06 itsfuad

@itsfuad Can you elaborate this issue. How does user aborts the upload by manually cancling the process?

FurqanAnwar avatar Jul 25 '23 11:07 FurqanAnwar

@itsfuad It's an old bug in multer - https://github.com/expressjs/multer/issues/259 In the conversation you can find a number of workarounds - basically you can listen to req 'aborted' event But it still creates unclosed stream and stuck file handler

Doc999tor avatar Jul 27 '23 21:07 Doc999tor