I would like to upload a file to S3 in parts and set some metadata in the file. I use boto to interact with S3. I can set metadata with unidirectional downloads, for example:
Is there a way to set metadata with multi-page loading? I tried this method to copy a key to change metadata, but it does not work with an error:InvalidRequest: The specified copy source is larger than the maximum allowable size for a copy source: <size>
I also tried the following:
key = bucket.create_key(key_name)
key.set_metadata('some-key', 'value')
<multipart upload>
... but multi-page loading overwrites metadata.
I use code similar to this for multi-page loading.
source
share