# File upload UI / view

**URL:** <https://www.ruby-forum.com/t/file-upload-ui-view/182034>\
**Category:** Rails\
**Created:** [January 21, 2010, 9:33pm UTC](https://www.ruby-forum.com/t/file-upload-ui-view/182034 "2010-01-21T21:33:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pitosalas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a4c791/32.png) [@pitosalas](https://www.ruby-forum.com/u/pitosalas)\
**Post date:** [January 21, 2010, 9:33pm UTC](https://www.ruby-forum.com/t/file-upload-ui-view/182034/1 "2010-01-21T21:33:20Z")

</div>

How do I define a view so that the page displays a simple link (e.g.  
“upload picture”) which upon clicking displays the browser’s standard  
file open dialog, so that, once the user clicks OK, the file is  
immediately uploaded and control goes to my action, with the file path  
as a parameter?

(note this is not something about attachment\_fu vs. paperclip or  
whatever. I am not seeking to store the file as an attachment but just  
process the file. It’s purely a user interface / view design question.)

Is it possible in rails? Or do I always end up with two buttons, one for  
‘choose file’ and another one for ‘upload’ ?

Thanks much!
