Directory form Select

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

John B. 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.

JB

It 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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs