Dhaval Phansalkar
2009-Jul-29 12:01 UTC
download file located outside rails aaplication folder
hi, how can i access/download a file located somewhere else outside rails application folder? suppose, file is in /tmp/ or /home/some_folder/ on linux, then what should be the path given for send_file? -DPP -- Posted via http://www.ruby-forum.com/.
Dhaval Phansalkar
2009-Jul-30 06:09 UTC
Re: download file located outside rails aaplication folder
Dhaval Phansalkar wrote:> hi, > > how can i access/download a file located somewhere else outside rails > application folder? suppose, file is in /tmp/ or /home/some_folder/ on > linux, then what should be the path given for send_file? > > -DPPone of our perl script generates reports in /tmp/reports and i need to download them. can somebody help in this please? is there any risk putting outside file path to download function? -dpp -- Posted via http://www.ruby-forum.com/.
http://api.rubyonrails.org/classes/ActionController/Streaming.html#M000421 Sijo -- Posted via http://www.ruby-forum.com/.
Dhaval Phansalkar
2009-Jul-30 12:21 UTC
Re: download file located outside rails aaplication folder
Sijo Kg wrote:> http://api.rubyonrails.org/classes/ActionController/Streaming.html#M000421 > > Sijothanks sijo. i had tried that some days back and it didn''t worked that time but it worked today.. strange. anyways... thanks for your time and help. btw, is there any risk putting the outside rails file path, directly in the download function? there is something called "sanitize" in the docs. can you or anybody explain a bit about that with some examples? -dpp -- Posted via http://www.ruby-forum.com/.