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
2010-04-08 13:34:27
btw... This files are big files (50MB). Performance?
xpepermint
2010-04-08 13:41:33
And yes... I was looking for send_file method, thx.
xpepermint
2010-04-08 13:42:11
make sure you take care on this performance caveat: http://www.therailsway.com/2009/2/22/file-downloads-done-right
clyfe
2010-04-08 13:47:54