-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Default S3 permissions trigger Aws::S3::Errors::InvalidArgument from AWS SDK #1974
Comments
What version of Paperclip and the aws-sdk are you using? I've just pulled in a PR that allows for aws-sdk v2 compatibility, and which also changes the default when using aws-sdk v2 to |
I'm using paperclip from git, revision: ece46f4 aws-sdk is version 2.0.48 I've just noticed that aws-sdk-v1 (1.65.0) is also in my Gemfile.lock. Maybe the version 2 default is being clobbered by the version 1 default? Broken paperclip initializer:
Uncommenting that Backtrace:
|
It was a bug in #1903. I just opened a PR. |
Thanks! Fixed with that PR. 👍 |
@tute the readme should probably mention when upgrading from aws-sdk |
Sure! Can you point at an error message, or commit by which this is necessary, so we refer to it in the commit message? |
@tute Probably the one tagged with 4.3.1 I was upgrading to aws-sdk ~> 2 to hopefully solve an issue with aws-sdk 1.54 replacing original uploads with 0 kb files on reprocess (#1936). Then got I found an issue stating that I needed to add s3_permissions: {
original: :public_read
} which I had to update to: s3_permissions: {
original: "public-read"
} |
Like @MarkMurphy suggested, is there any chance to update the Readme, informing this update? |
It should probably also be mentioned here: https://github.com/thoughtbot/paperclip/blob/b8d432d14973548ec460cb09e22f6a6f20611473/UPGRADING |
Sure! If you send a PR I'll merge right away, otherwise I'll do probably next week. |
The PR: #2064 |
Thanks @betesh nice job! |
The default s3_permissions (:public_read) cause an Aws::S3::Errors::InvalidArgument exception when trying to
save
a model with an attached file.Somewhere along the line support for :public_read has been dropped for 'public-read'.
Setting s3_permissions: 'public-read' in the config fixes the problem - 'public-read' should probably be the default going forward.
The text was updated successfully, but these errors were encountered: