Sunday, 16 April 2017

Retrive the file uploaded by multer express.js

Basically I am trying to render the file uploaded by the multer module in express. The file is uploaded to /uploads and I want to the file to be downloaded by a authenticated person only. How do i achieve that?

const cpUpload = upload.fields([{ name: 'image', maxCount: 1 }, { name: 'resume', maxCount: 1 }]);
const upload = multer({ dest: 'uploads/' });



via ilovecse

No comments:

Post a Comment