CFMU Update: onCompleteAll

Tags: CFMU
Word Count: 540

A couple people have asked about fixing up the events and with a prior release I was able to fix the on complete method. The on complete method will call a JavaScript method using the ExternalInterface library after each item in the list has been uploaded. Now that that works we needed a way to notify the client that all files were uploaded. After each file is successfully uploaded that file is removed from the files array. A quick check to see the length will let us know when we are done with all of the files

With that I decided to whip up a quick demo which is also in the download. This example will write each file name to the browser screen as its uploaded and then write out a message that all files are done.

If you want to downloaded the latest version along with all of the demos you can get it over at the CFMU Project Page on RIAForge

Comments

#1 Posted By: Ken Smith Posted On: 8/17/09 10:56 AM
Great! Love it! Thanks so much for this and for your help.
#2 Posted By: Brendan Canty Posted On: 8/18/09 1:58 PM
First off, this uploader is great, I'm enjoying playing with and trying to get it to work in my environment.

One small question I have, the onComplete method returns the name of the file, but it is returning the name of the file that the user uploaded, not necessarily the name of the file on the server, since cffile is using "nameconflict='makeunique'".

Is there an easy way to have the onComplete method become aware of the eventual filename on the server?
#3 Posted By: Dan Vega Posted On: 8/20/09 6:13 PM |
Author Comment
Because it is on the server I don't think there is really anything I can do but I will look into for you. One option you could upload to a temp directory, read that directory and compare the results with the list of files and then move them to where you want them to go.


Post Your Comment

Leave this field empty







Show Captcha

If you subscribe, any new posts to this thread will be sent to your email address.

Copyright © 2007 Dan Vega | BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.