Hi all, I need a way to ask a user to supply a directory on their computer (i.e. client) to which to download a series of files. So in other words, the user is asked: Please indicate directory to download to: .... And they click or something and get a chooser with which they can point to a directory on their computer. (Not a file, a directory, that may not yet exist, or that may be empty.) There must be a gem or something out there to help do this in a cross platform way, can anyone point the way? Thanks a lot! Pito -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder
2010-Apr-18 22:27 UTC
Re: Rails form field to ask for directory to download to
On Sun, Apr 18, 2010 at 3:11 PM, Pito Salas <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> And they click or something and get a chooser with which they can point > to a directory on their computer. (Not a file, a directory, that may not > yet exist, or that may be empty.) > > There must be a gem or something out there to help do this in a cross > platform way, can anyone point the way?Not a server-side process, this happens on the client -- google "file download Content-Disposition" -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder wrote:> > Not a server-side process, this happens on the client -- google > "file download Content-Disposition" >Yes but as I said in my question, I want the user to designate a directory to receive file(s), not a specific file name to download into. I am guessing that the solution will involve some javascript/ajax/or something, and I am also guessing that the browser inherently doesn''t have a feature to raise a chooser dialog box to choose a destination folder (not filename.) (Note: if I want to receive files in a directory called ~/mydownloads then I need a dialog box that lets me navigate my directory structure locally, but choose a directory not a file. The normal file open dialog box displayed by a browser makes me choose an existing file, as far as I understand...) -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder
2010-Apr-18 23:02 UTC
Re: Re: Rails form field to ask for directory to download to
On Sun, Apr 18, 2010 at 3:36 PM, Pito Salas <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Yes but as I said in my question, I want the user to designate a > directory to receive file(s), not a specific file name to download into.I think this is totally browser, user-specified browser preferences, and OS dependent, so I wouldn''t count on a server-side solution. But good luck :-) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.