• Subscribe  

9 Flex File Upload Examples Visited

Posted by Charles | August 14, 2007 .

As I recall, before Flex 2.0, the most wanted feature from Flex was File Upload. I still think the most significant improvement at Flex 2.0 is the file upload capability. So is it easy to do file upload with Flex now? Here I found some Flex file upload resources just in case you need them (I’m sure you will).

Flex File Upload Component

You can view the demo here. It’s small yet working Flex upload app. the original piece is here. They did a decent job to get upload going. Of cause once you started, in a real world project, you might need a lot more functions such as multiple file selection, etc.

Flex File Upload with PHP

The same guys did the above Flex File Upload Component did this. Sometime people forgot the one important part of the file upload equation is the receiving part. This one explains the sever part using PHP to handle uploaded file.

Flash 8 File Upload Download

As we know the Flex Upload is actually use the Flash 8 FileReference object to do the work. The guy who is writing the book ‘Flash 8 Upgrade Essentials’ provided a very detail demo showing how the upload is done within Flash 8. It gives you a good insight on what’s under the hood of Flex file handling.

Multiple Flex File Upload with ColdFusion

This is another good Flex file upload example that handles both client and server ends. The server side is ColdFusion, which is very familiar to lots of Coldfusion-turned Flex developers. I think lots of people use the one as prototype and tailor it fit into their own project. If you are in a ColdFusion shop, this is an excellent start point to deal with file upload issues.

Flex 2 and FileReference API

This is the classic article from Adobe to learn the Flex File Upload. I would recommend everybody interested in the come up with a fancy Flex file upload component needs have a good understanding the guts of the FileReference API.

Drag and Drop Flex File Upload with Ruby on Rails

You should know by now this is my favorite solution. This is the best so far I’ve encountered. It’s actually using Flex 3 and Adobe AIR (I start disliking the name). The server side is using the Ruby on Rails gem Merb to handle the received files. All the details are there and is just fascinating to see Flex/AIR works with RoR.

image 9 Flex File Upload Examples Visited

Working with Flex File Upload and Download

Well, if everything else failed to satisfy your file processing desires with Flex, you can always read the @#%! manual, as they always said.

File Upload Watcher with Apollo (AIR) and JavaScript

Kevin Hoyt will never fail you. This example demonstrate the strength of AIR and showed the powerful combination of AIR and JavaScript. If you are thinking about offline/online solution for your application and in the mean time deal with files, here is a very good start point.

Another Flex Upload Example

Just another small piece of Flex upload example. You can get the code here.

Let’s stop just here.

Leave a Comment

If you would like to make a comment, please fill out the form below.




To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word


To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Related Posts

20 Comments so far
  1. venu gopal  May 21, 2008 2:26 am

    Hi can any body get an example

    how to upload a file on to server using flex3 as front end

    and struts framework at back end

    Venu Gopal

  2. venu gopal  May 21, 2008 2:35 am


    i req i example in flex how to upload a file using flex 3
    as front end and struts at back end

    can any body help me

    Venu Gopal

  3. Emil Ivanov  May 29, 2008 8:15 am

    There is a mistake in the sentence “The server side is using the Ruby on Rails gem Merb to handle the received files.”
    Merb is a web framework like Rails, it’s not a Rails gem.


  4. Mark Farrer  October 31, 2008 10:33 am

    can you supply a server-side upload file in asp or .net?


  5. Alex Hernandez  January 5, 2009 8:54 am

    Hi, you must use the upload method of the FileReference class and specify a URLRequest where to upload your file.
    In some way you must emulate the action that is triggered in an html form with a file html control.

    This is the plain html way to upload a file:

    in this way you can select a file and then click on submit to sned to file that is received by the server Note that the url that I’m using (http://server/processUpload) is generic, It can be a servlet, an aspx or PHP script that receives the post request.

    Now, in Flex you can use something like:

    var fr:FileReference = new FileReference();
    fr.addEventListener(Event.SELECT, selectHandler); // calls selectHandler function after selecting the file
    fr.browse(); // Opens a file browse windows so you can select a file

    function selectHandler(event):void{
    var request:URLRequest = new URLRequest(“http://server/processUpload”); // Here is were you must specify your url that process the file
    request.method = URLRequestMethod.POST; // indicates that we are using a post
    fr.upload(request, “filepath”); //this is the name of the field in our previous html form its useful to identify the field in your server side script to get the file.



  6. Anonymous  January 21, 2009 1:21 pm

    altough these examples are nice, the most necessary feature for me would be an upload example with compressing ( zip/gzip ) the file on the CLIENT-side *before* uploading and checksumming on the server-side.

    until flash can do that, i’m stuck with JAVA applets…

  7. rich ruiz  February 14, 2009 12:26 pm

    To zip or unzip see….

  8. diszk  February 22, 2009 5:44 pm


  9. robina  March 5, 2009 10:20 am


  10. Urvashi  March 25, 2009 9:46 pm

    I am not sure whether I need ColdFusion server on my machine if I am using server-side script as upload.cfm?
    If yes, then where should this file be kept? where should I be launching my application? My localhost is throwing Error 405 and 2044/2038 all the time. I am so tired now:(

    Please help!


  11. Ganesh  May 28, 2009 3:30 am

    Hi nice work.

    but all comes with php or coldfusion script for upload control. is there any .net or java webserver script available?


  12. Fidel Gonzo  June 16, 2009 6:01 pm

    For a nice and easy Web-ftp solution, check my FileManager FX. Can be seen in action here

  13. Victor  June 17, 2009 7:20 pm

    I use the FlexAppsStore flex file uploader. It has saved me a lot of time over already.

  14. alchemist  October 1, 2009 8:34 am

    Here’s a another great example multiple file uploading:

  15. Alex  December 28, 2009 12:36 am

    There is also a good image uploader – Q-ImageUploader. It can resize/compress/rotate images on the client side.
    They also included highly customizable Free Files Uploader which is similar to one that is described here

  16. Joe Wazen  December 29, 2009 7:00 am

    i need an example of how to upload a file using jsp can anyone help?

  17. Flexa  January 23, 2010 8:52 am

    Flex file upload with ASP.NET:

  18. kalpesh  February 23, 2010 11:59 pm

    it is the wonderful for flex

  19. Rajiv Totlani  April 13, 2010 8:35 am

    There is another very nice component at that combines multiple file upload with form data, just like an html form but better since it extracts data from all the flex controls nested inside the form or a container within the form.

    Checkout the demo here….;vstr1=64

  20. jhon  February 13, 2011 9:57 pm

    i love it


Direct TV Offers - usdirect has the best directtv deals