Hi, I wanted to have a textbox which would have the file name specified and on submit in the controller I wanted to save this file on the server file system. Any pointers would helpful. Please note I do not want to use file_field since that does not match my requirement... My requirement is something like <input> upload c:\1.txt upload c:\2.txt </input> Button Submit On submit upload the 2 files to server Thanks, Sudhindra -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Sudhi Perhaps you can use hidden file_field and populate it with javascript from the text_field? James. 2009/3/18 Sudhi Kulkarni <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>> > Hi, > > I wanted to have a textbox which would have the file name specified and > on submit in the controller I wanted to save this file on the server > file system. Any pointers would helpful. > > Please note I do not want to use file_field since that does not match my > requirement... > > My requirement is something like > > <input> > upload c:\1.txt > upload c:\2.txt > </input> > > Button Submit > > On submit upload the 2 files to server > > Thanks, > Sudhindra > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
or you could parse the string inside that text_box and loop through the several entries. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
MaD wrote:> or you could parse the string inside that text_box and loop through > the several entries.Hi, Thanks for the inputs, but I am a newbie to ROR. I want to understand what exactly happens in the background when I use a file_field? Is it complex to have a file upload working without a file_field(Hidden atleast)? Regards, Sudhindra -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
So the user is typing in filenames directly? If that''s the case, what you''re asking is impossible - and for very good reasons. Javascript can''t access client-side files; it can''t even serialize file input tags (thus the issues with AJAX submission of file fields). --Matt Jones On Mar 18, 6:59 am, Sudhi Kulkarni <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hi, > > I wanted to have a textbox which would have the file name specified and > on submit in the controller I wanted to save this file on the server > file system. Any pointers would helpful. > > Please note I do not want to use file_field since that does not match my > requirement... > > My requirement is something like > > <input> > upload c:\1.txt > upload c:\2.txt > </input> > > Button Submit > > On submit upload the 2 files to server > > Thanks, > Sudhindra > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---