-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
I need a way to set metadata on uploaded items. What about an API like this?
s3: {
accessKeyId: '<your-aws-access-key>',
secretAccessKey: '<your-aws-secret>',
bucket: '<your-s3-bucket>',
region: '<the-region-your-bucket-is-in>',
metadata: {
key1: 'foo',
key2: 'bar',
},
}And then _putObject in lib/s3.js can read options.metadata and add to params. Basically a passthru.
var params = {
...existingStuff,
Metadata: metadata
};It would be up to the end user whether they want to use keyNames that S3 will collapse to x-amz-meta-keynames or key-names to get x-amz-meta-key-names. In other words, this library would have no opinion about how metadata key names should be formatted.
It would also be the end user's responsibility to convert their datatypes to String.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels