[Rails] Adding a timestamp to an uploaded image
In Rails 3 we have the asset pipeline, that automatically takes care of images, caching, etc.
But what about images uploaded by the user? Those images are uploaded into the "uploads" folder, and while you can move them around, they are outside the asset pipeline (please correct me if I'm wrong).
So, the user uploads an image and when he replaces it with another one, the browser still displays the previous one because it's using the cache, so a page refresh (cmd+r) is needed to display the new one.
How to avoid that? Isn't the image_tag supposed to add the timestamp automatically?
-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/aDZG8s6jy40J.
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