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 ...

Get Professional Adobe® Flex® 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.