Hi, Is there a way to allow a user to select a directory. I know how to use the file_field_tag to allow users to select a file but i would like the ability to allow a user to select a directory and then use the path for various stuff. file_field_tag only allows for the selection of files. Ive searched around and cant find any examples of this. JB -- 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 -~----------~----~----~----~------~----~------~--~---
John Butler wrote:> Hi, > > Is there a way to allow a user to select a directory. I know how to use > the file_field_tag to allow users to select a file but i would like the > ability to allow a user to select a directory and then use the path for > various stuff. file_field_tag only allows for the selection of files. > Ive searched around and cant find any examples of this. > > JBIt looks like a directory cannot be selected from a browser. I cant seem to get the file path from file_field_tag to use that as a way of getting the directory. What is the best way of getting a files path(i.e the directory its in)??? thepath = params[:xml_file].path #this returns nothing?? John B -- 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 -~----------~----~----~----~------~----~------~--~---