:action=>“download”}, :html => {:multipart => true}) do |f| %>
%>
<% end %>
<% end %>
I dont think I need the form_for line at the top, but the fiew is still
rendering ok, so have just left it in for now.
Jen, hi. Maybe you have considered against it but one thing is to use
CarrierWave or Paperclip. It does save data to a model in the db but the
files store in the FS. But even if you dont, I think this should work if
the
path is valid, as in my case it is just Paperclip providing the file
path,
then just link to the controller action which provides this:
Any ideas on how to do this or better suggestions would be great.
#First check the user is logged in
#send_file(directory + params[:file], :disposition => :attachment)
[email protected]
<mailto:[email protected]>.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Jen, hi. Maybe you have considered against it but one thing is to use
CarrierWave or Paperclip. It does save data to a model in the db but
the files store in the FS. But even if you dont, I think this should
work if the path is valid, as in my case it is just Paperclip
providing the file path, then just link to the controller action which
provides this:-
send_file @billing_run.tu_raw_bill_csv.path
Hi David.
All my files are being versioned with GIT, so I don’t really want to use
a DB table just for storing IDs if I can help it.
Would it be possible to have the action in the controller farm out to
the web-server to serve the files as long as they are in an authorized
directory, then use grit to checkout the downloaded content in GIT?
I still have the problem of telling the server exactly which file to
serve.
The idea is that users can annotate stuff then re-upload it. These
changes will be re-committed, so a history of the file will be stored.
This does screw up if a user changes the filename, but will deal with
that later!
Thanks in advance for any more help/suggestions,
Jen!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.