Accessing Word documents in a Rails app -


I have many documents (mainly word and excel) that I would like to make available to my rail app users. However, I have never done anything like this and wondered what was the best way to do it? Because only the number of small documents, and all will be uploaded by me, do I place them in my rail app (i.e. public / docs or similar) or should I set up a separate FTP? Perhaps there is an even better way to do this?

If they are publicly accessible, you of course just call them public However, you want to refer them to your app for cleanliness (and so if you change the URL later, for example, you do not want to change the link for all, depending on your Write a little helpful to generate URLs for your app, c Only one place is.

If, on the other hand, your files are only for log-in users, you must use one of the jobs or the webserver to send a file to the user Specific methods like X-Sendfile header to see before sending it back.


Comments