Forum: Ruby on Rails Filter access to static content

Posted by Geoffroy Gomet (Guest)
on 2010-03-09 21:20
(Received via mailing list)
How can I filter access to static content (images, movies, pdf, ...).
I'm familiar with filtering access to parts of a website, but how can
I manage to filter access to static files (uploaded images,...)?

Greetz

Geoffroy
Posted by Robert Walker (robert4723)
on 2010-03-09 22:19
Geoffroy Gomet wrote:
> How can I filter access to static content (images, movies, pdf, ...).
> I'm familiar with filtering access to parts of a website, but how can
> I manage to filter access to static files (uploaded images,...)?

Apache configuration or .htaccess file?

This isn't really relative to Rails. Requests for static content are 
generally served by the front end web server (Apache, Nginx, etc.) and 
never hit your Rails application.
Posted by Geoffroy Gomet (Guest)
on 2010-03-09 23:26
(Received via mailing list)
That's just what I'm asking, how to let Rails handle some static
content.
An example of what I mean : Someone upload a picture he wants to be
the only one to see even if someone else know the url of the picture.
Should there be a controller dedicated to filter and return the
pictures (with something like sendfile)
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.