File upload UI / view

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!

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