O'Reilly logo

Professional Adobe® Flex® 3 by Joe Berkovitz, David Hassoun, Andrew Trice, Tom Sugden, Todd Prekaski, Jun Heider, Peter Ent, Joseph Balderson

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

Chapter 44. File Management with Flex

This chapter will examine the local file management capabilities built into the Flex framework. Specifically, the following topics are discussed:

  • The FileReference, FileReferenceList, and FileFilter classes

  • Server-side considerations

Overview

Flex applications have the capability to work with local shared objects, a very specific type of local file, which was covered in Chapter 43, "LocalConnection and Shared Objects." In addition, if a Flex application SWF is local, its security sandbox settings can be set to either "local-with-filesystem" or "local-trusted" to allow reading from local files via classes such as flash.net.URLLoader. Security sandboxes are covered in Chapter 65, "The Security Model."

The majority of files are not local shared objects, and the majority of Flex application SWF files are served from remote servers. Therefore, the above-mentioned use cases will not be discussed in this chapter. Instead, this chapter will concentrate on the FileReference and FileReferenceList classes. We will discuss how to upload and download files to and from a remote server. We will also discuss some things to keep in mind when implementing the server-side code used to support file uploads.

Prerequisites

This chapter assumes that the user has a default installation of ColdFusion 8 Developer Edition. ColdFusion or any other application server technology is required to provide the server-side functionality necessary for a file upload.

The source code for ...

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