Ruby on Rails Thursday, December 1, 2011

On 1 December 2011 06:01, Annapoorna R <prapoorna.r@gmail.com> 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

:-)

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

No comments:

Post a Comment