This chapter will examine the local file management capabilities built into the Flex framework. Specifically, the following topics are discussed:
FileReference, FileReferenceList, and
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
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.
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 ...