Last active
April 3, 2018 08:02
-
-
Save coloredlambda/7dafbad9d2ae2defc2adacecd50ad13c to your computer and use it in GitHub Desktop.
Multer Disk Storage Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const storageConfiguration = multer.diskStorage({ | |
destination: (req, file, callback) => { | |
callback(null, `${__dirname}/upload`); | |
}, | |
filename: (req, file, callback) => { | |
let name = `ourFile${path.extname(file.originalname)}`; | |
callback(null, name); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment