Filter access to static content

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

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.

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)