This page will walk you through an example of adding the Infusion Uploader component to your application.
This tutorial assumes that:
For technical API documentation for the Uploader, see Uploader API.
Important Note about using the Uploader on a local file system
In order to test with the Uploader on a local file system, you will need to make modifications to your Flash settings. Please see Enabling Uploader on Local File Systems for instructions.
Suppose you are developing a content management system that will allow users to upload various types of files. You have the system basically set up and now just want to setup the multi-file Uploader to send the files to your server.
There are two basic steps to adding the Uploader to your application:
The rest of this tutorial will explain each of these steps in detail.
There are two specific configuration points for communicating with the server.
This option is used to put the Uploader in demo mode. In this mode, files are not actually uploaded. To ensure that your Uploader successfully sends files to server, either set the
demo option to
false or leave it unset.
This property of the
queueSettings option tells the Uploader where to POST files to. Set this property to the URL of the web service that will handle the file POSTs. It is important to note that this is the URL of the web service that will handle the POST, not the location where the files will be saved to. That will be determined by your server implementation (see Step 2: Configure the Server for more information).
Putting these two points together, your Uploader initialization will look like this:
Server configuration will be dependent on the implementation that you are using. In general, you'll want to expose a service that the Uploader can POST to. The Uploader will send individual POSTs for each file uploaded, with the file attached to a POST parameter called
Here's an example of a Cherrypy service that accepts the POSTED files.