Last active
July 15, 2018 12:52
-
-
Save Jerga99/042cc35f840c8d22ebc6ec9ec56a9570 to your computer and use it in GitHub Desktop.
This file contains 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 upload = multer({ | |
storage: multerS3({ | |
s3: s3, | |
bucket: 'medium-test', | |
acl: 'public-read', | |
metadata: function (req, file, cb) { | |
cb(null, {fieldName: file.fieldname}); | |
}, | |
key: function (req, file, cb) { | |
cb(null, Date.now().toString()) | |
} | |
}) | |
}) | |
module.exports = upload; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment