[Rails] profile picture display in Heroku
Hi all, I have a rails application where users can upload profile
pictures. Now this all works perfectly fine.
Problem is I have recently uploaded my application to Heroku. It allows
me to upload the image and actually states in the box what the image is
but doesn't display it as it can't find the file.
Are there any methods to change this free of charge?
My code looks like the following in the user model:
has_attached_file :photo,
:default_url => '/images/guest.png',
:url =>
"/assets/users/:id/:style/:basename.:extension",
:path =>
":rails_root/public/assets/users/:id/:style/:basename.:extension"
Just to confirm, the guest.png displays fine, but if I upload a picture
that is e.g. bear.jpg then at first it will display but if I come out of
the browser and then reload the page in the box it will say bear.jpg but
is broken.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home