I'm deploying my apps now to a server that has a read only file system. I was using a gem to make a zip file and randomly plopping it in /public somewhere. Now I can only write to tmp - how do I serve the user that file out of the tmp folder?
A:
Why would you use a read-only (I'm assuming Heroku?) when you have to serve files? Seems like you're swimming upstream. I'd use an AWS instance. You get the reliability, access and bandwidth. Not free, but what is?
Matt Darby
2009-10-15 03:06:47
A:
I ended up not using any of these methods. I am on Heroku, and the amount of images/files I need to serve isn't large enough to warrant cloud storage.
What I did was create a file in tmp using one method and linking to it with link_to_remote
to generate the file. Another link was made to an action which uses send_file
with the path of the file I created in temp.
The problems I was having was due to doing the generation and file serving being IN THE SAME method, which I will try to figure out and possibly post another question on.
Stacia
2009-10-22 20:02:42