upon adding an image to my prawn document and trying to pull that image from Amazon S3 storage I get the following error
ArgumentError (http://s3.amazonaws.com/briefbucket/photos/2/small/259823_1583726693707_1851950185_973122_7126850_n.jpg?1326839482 not found):
however i looked in my storage folder, the jpg is there. I noticed that the ending file name in prawn is "jpg?1326839482"?
any help would be appreciated.
Alright, I had the same issue today. Now: I'm using Amazon S3 and loading images uploaded by users. Solution as follows:
if @user.avatar? #in case user didn't upload anything
image open("#{ @user.avatar(:small).to_s.sub!(/\?.+\Z/, '') }")
end
Following
.to_s.sub!(/\?.+\Z/, '')
is used the get rid of all stuff after "?"
Before I have moved to amazon i was not using "open" which was causing the issue.
Let me know if this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With