Closed briandonahue closed 8 years ago
Thanks!
I'm not understanding how I would pass in metadata per file, though? I see that #26 allows you to pass in your own s3 instance with options, but I need to send metadata along with each file that is uploaded, based on that file/request. Maybe I'm missing it, but it doesn't seem #26 solves that problem?
I think that pull request might still be relevant, we have changed the code quite a bit since it was opened though so it will need a rebase with a few changes. Could you look at #27 and model it after that? Note the added documentation and the usage of setImmediate
:ok_hand:
Will add the documentation, not finished yet...
@LinusU @badunk OK, I think this is all set. Let me know what you think.
Looking awesome :raised_hands:
LGTM from me
@badunk Just bumping this. Any thoughts, or is it good to merge?
🎉
I added another callback function to the options for creating metadata for the s3 object. For example you could use the below (ES6 example) to add all the fields from the body as metadata. I found that extending a plain object (using
Object.assign
here) was necessary as passingreq.body
directly throws an error, I didn't dig too far into that, I'm assuming it's a not just a hash and aws didn't like it.