richardgirges/express-fileupload

How can I use this to not clean up temp files?

JemiloII opened this issue · 2 comments

I want to just use tmp files to save directly to a folder so I'm not wasting resources moving files. I'm already using another middleware for security to check the recipient that I trust. having to do file.mv is pretty dumb.

You can set tempFileDir to the target folder and than rename files if you need original names.

file.mv method uses fs.rename.
So if you set tempFileDir to the target folder, middleware will put files there and only renaming will be done.