Upfile breaks S3 file url
Reported by Yaroslav Markin | August 24th, 2008 @ 05:16 AM
File backend:
>> p = Profile.new
>> p.avatar = File.new("./public/images/rails.png")
=> #<File:./public/images/rails.png>
>> p.save
=> true
>> p.avatar.url
=> "/avatars/2/original/rails.png?1219568775"
S3 backend:
>> p = Profile.new
>> p.avatar = File.new("./public/images/rails.png")
=> #<File:./public/images/rails.png>
>> p.save
warning: peer certificate won't be verified in this SSL session
=> true
>> p.avatar.url
=> "http://s3.amazonaws.com/BUCKET_HERE/Users/yaroslav/Projects/tmp/paperclip-test/public/avatars/3/original/rails.png?1219569197"
Comments and changes to this ticket
-
Yaroslav Markin August 24th, 2008 @ 05:20 AM
Followup: it actually is created in S3 with key "/Users/yaroslav/Projects/tmp/paperclip-test/public/avatars/3/original/rails.png"
-
Jon Yurek November 5th, 2008 @ 04:07 PM
- → State changed from new to open
What is the attachment's :path set to? That's what gets used as the key name in S3.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
