Skip to content

Instantly share code, notes, and snippets.

@Jerga99
Last active July 15, 2018 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jerga99/042cc35f840c8d22ebc6ec9ec56a9570 to your computer and use it in GitHub Desktop.
Save Jerga99/042cc35f840c8d22ebc6ec9ec56a9570 to your computer and use it in GitHub Desktop.
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