aws-s3 icon indicating copy to clipboard operation
aws-s3 copied to clipboard

Cannot set metadata on creation

Open martinos opened this issue 15 years ago • 1 comments
trafficstars

It would ne nice if we were able to add metadata on object creation.

If I do something like:

obj = bucket.new_object obj.key = "test.txt" obj.value = "some text" obj.metadata[:subject] = "My subject"

I get ArgumentError: wrong number of arguments (0 for 1) aws-s3-0.6.2/lib/aws/s3/object.rb:513:in `initialize'

After that if I try to fetch this object using obj = bucket["test.txt"] then I do obj.metadata, I get the same error.

I didn't find any way to modify the metadata of this object without restarting the app.

martinos avatar Sep 14 '10 20:09 martinos

In case anyone has this problem, you should try the new official amazon gem aws-sdk (https://github.com/amazonwebservices/aws-sdk-for-ruby. ). Since there is no support on this gem anymore.

martinos avatar Jul 19 '11 03:07 martinos