Permalink
Browse files

claridy handling missing files

  • Loading branch information...
1 parent 1dd3df3 commit 56634a12971cfb640b28a02f31952029a26e657c @fcheung fcheung committed Jan 1, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 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.

0 comments on commit 56634a1

Please sign in to comment.