有没有办法更改S3文件的密钥?例如,我希望能够做相当于:
>>> from boto.s3.key import Key
>>> k=Key(bucket)
>>> k.key='cli-images/image-thumb.jpg' # this is the original key
>>> k.key='cli-images/moved/image-thumb.jpg' # this is the key I want to change it to
>>> k.save()
在查看boto文档时,我只能找到一种方法将一个密钥复制到另一个bucket中,但是在这种情况下,我需要文件保持在同一个bucket中,只需移动位置(即change key)。谢谢您。在
只需将对象复制到同一个bucket并删除原来的bucket:
相关问题 更多 >
编程相关推荐