We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
So, after much confusion, seems that there is a bug with the "copy_object" method.
The documentation states that you can do:
object = bucket.objects.find("lenna.png") object.copy(:key => "lenna.png", :bucket => bucket, :acl => :public_read)
But after digging around I found that the :acl => :public_read causes an InvalidArgument Error.
:acl => :public_read
InvalidArgument
https://github.com/qoobaa/s3/blob/master/lib/s3/object.rb#L40 parses the acl attribute on the object for normal "saving", but for the copy method, https://github.com/qoobaa/s3/blob/master/lib/s3/object.rb#L159, this parsing is skipped, sending "public_read" to S3, which it doesn't allow. i.e. "_" instead of "-".
acl
The text was updated successfully, but these errors were encountered:
Could you create a PR with a fix?
Sorry, something went wrong.
I ran into this problem as well. My workaround is using the string public-read instead of the symbol :public_read
public-read
:public_read
Example:
object = bucket.objects.find("lenna.png") object.copy(:key => "lenna.png", :bucket => bucket, :acl => 'public-read')
No branches or pull requests
So, after much confusion, seems that there is a bug with the "copy_object" method.
The documentation states that you can do:
But after digging around I found that the
:acl => :public_read
causes anInvalidArgument
Error.https://github.com/qoobaa/s3/blob/master/lib/s3/object.rb#L40 parses the
acl
attribute on the object for normal "saving", but for the copy method, https://github.com/qoobaa/s3/blob/master/lib/s3/object.rb#L159, this parsing is skipped, sending "public_read" to S3, which it doesn't allow. i.e. "_" instead of "-".The text was updated successfully, but these errors were encountered: