I want to create an empty folder in Amazon S3 using Ruby SDK. Ive read that there is no folder concept in S3, so to construct a folder theoretically you have only one empty object with an empty "/"
s3 = Aws :: S3 :: Client new (region: 'EU-West-1', credentials: credits) s3.put_object (bucket: "my_bucket", key: "my_folder /")
By doing this Creates an empty object on my bucket, but then if I try to upload a file like this:
s3.put_object (bucket: "my_bucket", well Minister: "my_folder / myfile")
It does not make a file in my final it keeps old empty object, and creates a folder and a file. Therefore the bucket structure is followed by two commands:
my_bucket / my_folder my_folder / my_file
Why is this happening? Why does this object repeat my_folder? How do I create an empty folder for later use?
No comments:
Post a Comment