From 56634a12971cfb640b28a02f31952029a26e657c Mon Sep 17 00:00:00 2001 From: Frederick Cheung Date: Thu, 1 Jan 2009 19:06:26 +0000 Subject: claridy handling missing files --- railties/doc/guides/source/form_helpers.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'railties/doc/guides/source/form_helpers.txt') diff --git a/railties/doc/guides/source/form_helpers.txt b/railties/doc/guides/source/form_helpers.txt index 095df857a2..baa1c4a039 100644 --- a/railties/doc/guides/source/form_helpers.txt +++ b/railties/doc/guides/source/form_helpers.txt @@ -600,6 +600,8 @@ end Once a file has been uploaded there are a multitude of potential tasks, ranging from where to store the files (on disk, Amazon S3, etc) and associating them with models to resizing image files and generating thumbnails. The intricacies of this are beyond the scope of this guide, but there are several plugins designed to assist with these. Two of the better known ones are http://github.com/technoweenie/attachment_fu[Attachment-Fu] and http://www.thoughtbot.com/projects/paperclip[Paperclip]. +NOTE: If the user has not selected a file the corresponding parameter will be an empty string. + Dealing with Ajax ~~~~~~~~~~~~~~~~~ Unlike other forms making an asynchronous file upload form is not as simple as replacing `form_for` with `remote_form_for`. With an AJAX form the serialization is done by javascript running inside the browser and since javascript cannot read files from your hard drive the file cannot be uploaded. The most common workaround is to use an invisible iframe that serves as the target for the form submission. -- cgit v1.2.3