Wish List
Tags
adobe air ajax coldfusion examples ext flex javascript max2007 misc technology ui
Recent Entries
Adobe Releases Flash 10 (beta)
Adobe Needs Your Feedback - Enter to win a prize!
A Question of Speed
It's a BOY!
Unit Testing Functions that Access Web-Services
Search
RSS
Subscribe
Uploading Multiple Files
Ever wanted to build an application that allows the user to upload multiple files? Well we all know it can't really be done unless you use either a Java Applet or Flash.
Doing a Google search turns up all manner of applications to do just that. But I want something simple, nothing more than a text box, a browse button, an upload button and a progress bar. Unfortunately my search turned up nothing, so I set about building my own using Flex 3.0.
It isn't anything special but you can: 1) Change the background color by tagging on a query string 2) Have a javascript function on the page that passes the urlyour upload page and any other parameters you want to pass along to the SWF. 3) Have a javascript call back function on upload complete
It provides the functionality I want and that is to upload multiple files, without any other unnecessary fancy bits, and requires minimal setup too.
<param name="movie" value="Uploader.swf">
<param name="quality" value="high">
<param name="wmode" value="opaque">
<embed src="Uploader.swf?BackgroundColor=ffffff" wmode="opaque" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="380" height="78" style="z-index:-100000 "></embed>
</object>
The Javascript functions:
function getPath(){
return "upload.cfm?cfid=#cfid#&cftoken=#cftoken#&path=#uploadpath#"
}
function uploadComplete(){
//do something here after the upload }
</script>
And finally a screenshot:
1)Before Upload:
2)After Upload:
If you would like a copy send me an email: gary[ at ]garyrgilbert[ dot ]com or you could click the download link at the bottom of this post.


There are no comments for this entry.
[Add Comment]