I’m trying to figure out the best way to protect images uploaded by
users who may wish to keep them private.
For example, if they are uploaded in the default file_column location
(/public/blah/blah/1/) then someone can simply type the URL
http://www.blah.com/blah/blah/1 and get the image.
I can store the images in a non-public directory in the rails app (ie:
/railsapp/images/X/) but how do I get a controller to display it (with a
given layout)? Can send_data be used to display an image and associated
HTML or just the file itself?
I don’t want to store the image as a blob in the database.
Can anyone please point me in the right direction? Any help is