SWFUpload: Open source Flash multi-file upload
So you're building a web site and want users to upload files--lots of files at once. Using an ordinary HTML file dialog is easy and gets the job done, but if the user wants to upload 30 files he has to click on a "Browse..." button 30 times and select each file one at a time. Some sites, like Flickr, solved this problem with a downloadable desktop app. Others used Java applets. And then along came Flash 8, which had perhaps the most promising solution: Built-in support for uploading multiple files at once. Brilliant! However, harnessing this power was not simple--it required, for one thing, a copy of Flash MX, which ain't cheap, not to mention the actual knowledge to use it.By now I'm sure you know where I'm going with this: SWFUpload. It's an open source Flash widget that lets you add multiple simultaneous file uploads to your web service without spending so much as a cent. It's fairly robust, allowing you to specify your own custom graphics and dimensions for the upload button, choose which file types will be allowed, as well as JavaScript callback functions for showing upload progress, errors, and so on. And like I said, it's open source, so if you do happen to have Flash MX and some skills, you can tweak the .FLA source til your heart's content. Very cool.












Comments
6
Subscribe to commentsAlex EzellNov 17th 2006 1:36AM
A Tip:
If you need to pass variables to the script which handles the files on the backend, the only way to do it easily is to add the variables to the querystring in the init of the SWFUpload like so:
upload_backend : "../upload.php?variable=$data",
BrianPeirisNov 16th 2006 7:57PM
Nice, Bubbleshare.com uses this method, it was one of their star features when they began.
I can really see this being used widely, I wonder how Adobe will feel about it.
StrangeProgressNov 16th 2006 10:49PM
Thats a handy Flash widget for sure! And the price is right.
Once again Open Source comes to the rescue!
GirishDec 20th 2006 9:03PM
This is really cool!!!! I have been thinking on the same line but from the PHP angle but when I saw your stuff..I forgot mine!!!
The only question I have is that this flash runs on background...I want to show the file progress by %...and I am not sure how to do that...can you please suggest something on this?
RamanJan 8th 2007 8:13PM
There is a big problem incorporating this code into ASP.NET, since I need to use default form tag as well as the additional form tag for this code. If I remove the form tag from the target div, it gives error.
RamanJan 8th 2007 8:13PM
There is a big problem incorporating this code into ASP.NET, since I need to use default form tag as well as the additional form tag for this code. If I remove the form tag from the target div, it gives error.