Choose a directory path

View: New views
5 Messages — Rating Filter:   Alert me  

Choose a directory path

by Adam Akhtar-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello everyone,

How to give the functionality to choose a directory path to save a file
by a user?


Thanks in advance....
--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Choose a directory path

by Matt Jones :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




On Nov 6, 12:34 am, Salil Gaikwad <rails-mailing-l...@...>
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 Jones
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Choose a directory path

by Adam Akhtar-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



> Save a file where? On the server's filesystem or the client's? Not
> much info in this question...
>
> --Matt Jones


Hi Matt,

I want to save file at Client's System.

Thanks,

Salil Gaikwad




--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Choose a directory path

by Matt Jones :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




On Nov 6, 11:07 pm, Salil Gaikwad <rails-mailing-l...@...>
wrote:
> > Save a file where? On the server's filesystem or the client's? Not
> > much info in this question...
>
> > --Matt Jones
>
> 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:

http://support.microsoft.com/kb/260519

(on the MS KB, but the header works everywhere).

--Matt Jones
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Choose a directory path

by Adam Akhtar-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Salil Gaikwad wrote:

>
>> Save a file where? On the server's filesystem or the client's? Not
>> much info in this question...
>>
>> --Matt Jones
>
>
> Hi Matt,
>
> I want to save file at Client's System.
>
> Thanks,
>
> Salil Gaikwad

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
--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@...
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---