views:

45

answers:

2

I have an application which uploads images to an S3 bucket using Paperclip. It's been working fine for months, but suddenly my files are not being uploaded to the S3 bucket. Unfortunately, I've been doing a refactoring in a number of unrelated areas, and it's possible that something I changed broke my upload.

I'm using paperclip 2.3.1.

That said, there are a number of confusing aspects to this and frankly I am at a loss. First, there are no errors in the log indicating that the upload failed. The paperclip attachment attributes are populated in the database. The application thinks the upload occurred successfully. But when I look in S3, the file is not there.

Second, I have an almost identical attachment on a different model, which uploads to the same S3 bucket successfully -- the code is almost identical, and there clearly cannot be a permissions issue.

I found references in several places that suggested removing the right_aws game and instead only having the aws_s3 gem...which I did...but to no avail. Moreover, I never saw the (5 for 4) error in my log regardless.

Does anyone have any suggestions on how I can further diagnose this? Are there any options in paperclip to increase the verbosity of logging?

Thanks!

A: 

Did you guys ever figure out a solution to this? I am having the exact same problem: some files will upload to s3 just fine, some will fail silenty.

Any help much appreciated as it's driving us (and our client) insane...

Regards, Erwin

ErwinM
+1  A: 

I just solved this and thought i'd come back to share:

It turns out my app was using Paperclip 2.3.4 which introduced some S3 issues.

Upgrading to 2.3.5 solved the issue for me.

Cheers.

ErwinM