views:

33

answers:

1

Hey. In my rails application each client has a file. This file must not be accessible to public, only to the user (authenticated user). How would you implement this functionality?

+2  A: 

You need put this file in other place than /public directory.

After you can use send_file in your controller to send file by user.

shingara
btw... This files are big files (50MB). Performance?
xpepermint
And yes... I was looking for send_file method, thx.
xpepermint
make sure you take care on this performance caveat: http://www.therailsway.com/2009/2/22/file-downloads-done-right
clyfe