Hello everyone,
How to give the functionality to choose a directory path to save a file
by a user?
Thanks in advance…
Hello everyone,
How to give the functionality to choose a directory path to save a file
by a user?
Thanks in advance…
On Nov 6, 12:34 am, Salil G. [email protected]
wrote:
Hello everyone,
How to give the functionality to choose a directory path to save a file
by a user?
Save a file where? On the server’s filesystem or the client’s? Not
much info in this question…
–Matt J.
Save a file where? On the server’s filesystem or the client’s? Not
much info in this question…–Matt J.
Hi Matt,
I want to save file at Client’s System.
Thanks,
Salil G.
Salil G. wrote:
Save a file where? On the server’s filesystem or the client’s? Not
much info in this question…–Matt J.
Hi Matt,
I want to save file at Client’s System.
Thanks,
Salil G.
Hi Salil,
I think you want download file option. For example on hitting a URL you
want user to download a zip file code for it you can do something like
this -
class MyController < ApplicationController
def downloadzip
send_file “path_to_file”, :type=>“application/zip”
end
end
Thanks
– Prasad
http://roorky.com
Interactive Programming Books
On Nov 6, 11:07 pm, Salil G. [email protected]
wrote:
Save a file where? On the server’s filesystem or the client’s? Not
much info in this question…–Matt J.
Hi Matt,
I want to save file at Client’s System.
The most reliable way to get a file to download every time (regardless
of content type) is to send a Content-Disposition header set to
‘attachment’. See this doc:
(on the MS KB, but the header works everywhere).
–Matt J.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs