Uploading sensitive data, Should I user memoryStorage (buffer) or save and delete file?

I need to save very sensitive data from an Excelfile that the user uploads. The data will then be saved to mySQL. All is done in Node.js. Now I wonder what is the most secure way to upload the file. Should I use Multer (https://expressjs.com/en/resources/middleware/multer.html) which has a memoryStorage option (a buffer of the entire file), or should I save the file to a folder and then delete it as soon as all data is added to mySQL? From a security viewpoint, what is the best option?
http://dlvr.it/RyfHWx

No comments:

Post a Comment