O'Reilly logo

Flex on Rails: Building Rich Internet Applications with Adobe Flex 3 and Rails 2 by Daniel Wanja, Tony Hillerson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

22 File Upload

Goal

You need to provide a Flex application that lets the user upload files from a hard disk. It must also upload bitmap images to a Rails application.

Solution

Use the attachment_fu Rails plug-in together with the FileReference and URLLoader classes provided by the Flex framework to quickly add file upload capabilities to your Flex with Rails application.

File Upload

Your application may need to let the user upload images, such as an avatar, a screen capture, an album cover, photos, or a word document. The HTTP protocol supports form-based file uploads, and every browser implements a file upload widget. So, in Rails, to create an HTML form with a file upload widget, you create a form using the form helper ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required