Closed rideddy84 closed 8 years ago
S3 doesn't have real folders, to get what you want you can just prepend folder name followed by a /
to the key.
edit: s/append/prepend
Just tried this, and works great! However by append, he means prepend. Ie:
key: function (req, file, cb) {
cb(null, 'foo-folder/' + makeid() + '_' + file.originalname)
}
puts file in folder named foo-folder
with a url of https://s3.amazonaws.com/bucketname/foo-folder/id_file.originalname
In this case, how can I set the destination folder name? Thanks.