Hi,
I am new over here and also a newbie for Ruby on Rails. I am working on
a simple webapp for my band work. I have created a upload
controller/model and database which allows to save my files in the
directory at /public/dump/. Uploading works but I can’t retrieve it.
I have tried several ways. The model uses DUMP_PATH = RAILS_ROOT +
“/public/dump” to save the file. But when I use it in view as:
<%= link_to upload.filename, :action => RAILS_ROOT + “/public/dump/” +
upload.filename %>
It doesn’t retrieve. I can’t access to the file even by using absolute
paths. The HTML output is:
I don’t what’s wrong. As I said, the absolute paths don’t work as well.
Thanks in advance. I have made the above possible by following this:
http://www.albert.bagasie.com/RailsTips/FileUpload
Regards,
Rizwan R.