How to secure images with Rails?

Posted by NotDan on Stack Overflow See other posts from Stack Overflow or by NotDan
Published on 2010-04-26T14:20:40Z Indexed on 2010/05/02 18:38 UTC
Read the original article Hit count: 218

I have a gallery in my rails app that needs to only allow certain images to be shown to specific, logged in users. I am using Paperclip for image processing now, but it saves all images in a public folder available to anyone.

Note that I don't have to use Paperclip if there is a better way, and I already have the login system in place. I just need a way to place the images in a non-public location, but still be able to serve them as needed.

Is it possible to only allow these images to be served to authenticated users?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about web-development