use*_*364 5 file-upload amazon-s3 boto
我想将文件部分上传到S3,并在文件上设置一些元数据.我正在使用boto与S3进行交互.我可以使用单操作上传设置元数据,如下所示:
有没有办法用分段上传设置元数据?我已经尝试过这种复制密钥来更改元数据的方法,但它失败并出现错误:InvalidRequest: The specified copy source is larger than the maximum allowable size for a copy source: <size>
我也尝试过以下方法:
key = bucket.create_key(key_name)
key.set_metadata('some-key', 'value')
<multipart upload>
Run Code Online (Sandbox Code Playgroud)
...但是分段上传会覆盖元数据.
我正在使用与此类似的代码来执行分段上传.