Creating a folder via s3cmd (Amazon S3)

前端 未结 3 1190
既然无缘
既然无缘 2020-12-29 21:32

I am using s3cmd to upload files to my S3 server. My problem is that when a directory on the server does not exist the upload fails. How can I tell s3cmd to create the folde

3条回答
  •  孤城傲影
    2020-12-29 21:55

    I believe you should try something like s3cmd put file.jpg s3://bucket/folder/file.jpg.

    S3 doesn't have the concept of directories, the whole folder/file.jpg is the file name. If using a GUI tool or something you delete the file.jpg from inside the folder, you will most probably see that the folder is gone too. The visual representation in terms of directories is for user convenience.

提交回复
热议问题