

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

Well, if everything else failed to satisfy your file processing desires with Flex, you can always read the @#%! manual, as they always said.
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.
Just another small piece of Flex upload example. You can get the code here.
Let’s stop just here.
If you would like to make a comment, please fill out the form below.
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
thanks
Venu Gopal
Hi
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
thanks
Venu Gopal
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.
Regards
Hi
can you supply a server-side upload file in asp or .net?
Regards
Mark
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.
}
HTH
.::AleX::.
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…
To zip or unzip see….
http://codeazur.com.br/lab/fzip/
thanks
HELO
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!
Warmly,
Ur
Hi nice work.
but all comes with php or coldfusion script for upload control. is there any .net or java webserver script available?
regards
ganesh
For a nice and easy Web-ftp solution, check my FileManager FX. Can be seen in action here
I use the FlexAppsStore flex file uploader. It has saved me a lot of time over already.
http://www.flexappsstore.com/index.php?route=product/product&product_id=54
Here’s a another great example multiple file uploading:
http://bytearray.brixtonjunkies.com/2009/10/01/flex-multiple-file-uploader/
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
http://www.quadroland.com/q_imageuploader
i need an example of how to upload a file using jsp can anyone help?
Flex file upload with ASP.NET: http://takokoren.blogspot.com/
it is the wonderful for flex