3
有沒有辦法改變S3文件的密鑰?舉例來說,我希望能夠做的相當於:S3上使用boto庫
>>> 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()
在尋找在博託文檔,我只能找到一種方法來複制鑰匙到另一個桶,但在這種情況下,我需要文件留在同一個桶中,只需移動位置(即更改鍵)。謝謝。