In the Node.js application, is it possible to upload the file ( multipart/form-data) directly to the buffer on the server instead of saving the file to the file system?
In psuedo code, you usually do this with a file upload form
router.post('/upload', function(req, res, next){
});
Is it possible to skip the part of saving the file to /tmpand just grab the downloaded file as a buffer and transfer it directly to the target directory?
An example would be to download an image, then optimize the image, and then save it to the designated destination. Can you just capture the incoming stream, optimize it, and then save it, without first saving to the directory /tmp?
source
share