Rails: form input type and getting the filename
Posted
by Shyam
on Stack Overflow
See other posts from Stack Overflow
or by Shyam
Published on 2010-04-25T01:24:08Z
Indexed on
2010/04/25
1:33 UTC
Read the original article
Hit count: 255
Hi,
As I am using Ruby on Rails to build an application, which only runs locally, I am lost in the woods (a nuby without a compass). I have a simple MVC application and my view is missing one thing I could really use. I want to select a local file just to retrieve it's filename. I know it's relatively easy to use the form tag helpers for uploading:
<%= file_field 'upload', 'datafile' %></p>
I wonder how I could get the filename from the selected file, without uploading the file.
© Stack Overflow or respective owner