# Retaining file path

**URL:** <https://www.ruby-forum.com/t/retaining-file-path/191008>\
**Category:** Rails\
**Created:** [July 2, 2010, 2:05pm UTC](https://www.ruby-forum.com/t/retaining-file-path/191008 "2010-07-02T14:05:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [July 2, 2010, 2:05pm UTC](https://www.ruby-forum.com/t/retaining-file-path/191008/1 "2010-07-02T14:05:56Z")

</div>

Hello All,

I am submitting a page which consists of a file type input. So if i  
select file path after browsing and validation error comes out then all  
other info is chipped to the page but no file path. So can you guys  
light me into some direction that how to retain file path.

Also, can i retain javascript values as well … ? 🙂

Thanks in advance to you guys.

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [July 2, 2010, 4:24pm UTC](https://www.ruby-forum.com/t/retaining-file-path/191008/2 "2010-07-02T16:24:46Z")

</div>

It’s nothing to do with Rails or your coding; html security prevents  
file  
input boxes being populated with any default value.

On Jul 2, 2010 1:06 PM, “Hemant B.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

Hello All,

I am submitting a page which consists of a file type input. So if i  
select file path after browsing and validation error comes out then all  
other info is chipped to the page but no file path. So can you guys  
light me into some direction that how to retain file path.

Also, can i retain javascript values as well … ? 🙂

## Thanks in advance to you guys.

Posted via [http://www.ruby-forum.com/](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 removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).
