File upload

hello,
using rails2.3.9 ruby 1.8.7 paperclip
how to keep the file uploaded path or name of the file in the field
after
the page gets refreshed.so that user no need to reupload the file(It
gets
deleted after refresh)

You should probably be using sessions, check
ActionController::Integration::Session - APIdock for
version 2.3.8 and older (I don’t think there is a version 2.3.9?).

Fra: [email protected]
[mailto:[email protected]] P vegne af Annapoorna R
Sendt: 1. december 2011 07:02
Til: [email protected]
Emne: [Rails] file upload

hello,
using rails2.3.9 ruby 1.8.7 paperclip
how to keep the file uploaded path or name of the file in the field
after the page gets refreshed.so that user no need to reupload the
file(It gets deleted after refresh)

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
[email protected]mailto:[email protected].
To unsubscribe from this group, send email to
[email protected]mailto:[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

On 1 December 2011 06:01, Annapoorna R [email protected] wrote:

hello,
using rails2.3.9 ruby 1.8.7 paperclip
how to keep the file uploaded path or name of the file in the field after
the page gets refreshed.so that user no need to reupload the file(It gets
deleted after refresh)

You can’t.

It’s nothing to do with Rails. It’s to do with browser security. It
wouldn’t be much good if websites could populate a file field with a
path to a local file. If they could, the site could then use JS to
submit the form and upload the file (in the background, in hidden
divs, etc) and essentially steal files from your computer…

Even Microsoft think it’s a bad idea:
http://support.microsoft.com/kb/266087

:slight_smile: