aws-s3
aws-s3 copied to clipboard
Cannot set metadata on creation
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.
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.