Upload file module
Installation
npm install --save @abejide001/upload-module
Usage
const uploadFile = require("@abejide001/upload-module")
app.post('/upload', uploadFile(process.env.ID, process.env.SECRET), function(req, res, next) {
res.send('Successfully uploaded ' + req.file.location + ' files!')
// File - req.file.location
})
Upload file module
Installation
npm install --save @abejide001/upload-module
Usage
const uploadFile = require("@abejide001/upload-module")
app.post('/upload', uploadFile(process.env.ID, process.env.SECRET), function(req, res, next) {
res.send('Successfully uploaded ' + req.file.location + ' files!')
// File - req.file.location
})