I am trying to understand what needs to be done to initiate a download of files that are housed on a server different from the one on which the Rails app is?
Specifically, my Rails app is on Heroku and the PDFs I want to make available for download are on Linode. I would like the client to get the PDFs when he/she clicks on a download button in the web-app
My first attempt was with send_file :type => 'application.pdf', :x_sendfile => true. But this is obviously wrong because it can only serve files stored locally on the web-app server
- Is there, therefore, a way to get Linode to send data directly to the client? , OR
- Do I have to download the file locally and then call send_file ? (yuck!!!)
- Would any changes be required on the Linode end? I have a web-service running there on Tomcat
Thanks in advance for your help, Abhinav