CFMU 1.0 Released
Dan Vega said: What version of ColdFusion are you using? If you are using 9 multi file uploads are pretty easy now ...
[More]
CFMU 1.0 Released
notthatbright said: Hi Dan,
Additionally this is what i get as output from flash
Error: Error #2014: Feature is not av...
[More]
CFMU 1.0 Released
notverybright said: Hi Dan,
I'm also having problems with the onComplete function. It seems it's failing and not genera...
[More]
Runners, I need your advice
Matt W said: Hey Dan,
I was in a similar boat about 4 years ago. I had been running here and there, doing a bit ...
[More]
Runners, I need your advice
Jon Dowdle said: I'm not a runner (so take this as you will) but a great intro into strength training is this book: S...
[More]
#1 by Steve Withington on 7/21/09 - 11:52 PM
Congrats on reaching v1.0! And thanks!
#2 by Ken Smith on 7/28/09 - 10:42 AM
Thanks,
#3 by Dan Vega on 7/28/09 - 10:46 AM
Basically you can properties using the upload URL. uploader.cfc?method=upload¶m1=1¶m2=2
#4 by Ken Smith on 7/28/09 - 11:37 AM
Hope my code doesn't get all munged...
We tried sending it in the url, like this:
<cfmodule template="../cfmu/uploader.cfm"
basePath="../cfmu/"
id="filter-uploader"
title="My Image Uploader"
width="400"
height="300"
url="../demo/uploader.cfc?method=test&bucketName=thisshouldwork"
dir="#expandPath('.')#\images\"
filters="#filters#"
/>
Notice the "bucketName" param...
Then outputting it in the cflog like this:
<cffunction name="upload" access="remote" output="true" returntype="string" >
<cfargument name="bucketName" default="didntwork" required="false" />
<cffile action="upload" filefield="Filedata" destination="#form.path#\#form.filename#" nameconflict="makeunique" />
<cflog text="4: #bucketName#" />
<cfreturn bucketName>
</cffunction>
But it will not write the value we passed in.
I think it has to do with this code in uploader.cfm:
<param name="flashVars" value="url=#attributes.url#&title=#attributes.title#&dir=#attributes.dir#&progressBarLabel=#attributes.progressBarLabel#&filters=#filtersString#&confirmDeleteMSG=#attributes.confirmDeleteMSG#&onComplete=#attributes.onComplete#&maxFileSize=#attributes.maxFileSize#&maxFiles=#attributes.maxFiles#" />
Because the line would then read:
<param name="flashVars" value="url=../demo/uploader.cfc?method=test&bucketName=thisshouldwork&title=#attributes.title#...
See how the bucketName param is now being passed to flashvars instead of being included in the url param?
Thanks again for looking at this, I'm probably just doing something wrong...
#5 by Ken Smith on 7/28/09 - 11:47 AM
You should do this: uploader.cfc?method=upload%26param1=1%26param2=2
And that fixes it.
#6 by Kurt Graber on 7/29/09 - 10:07 AM
I am trying to use the onComplete functionality of CFMU to reload the page and display the uploaded images below the uploader. When I call the onComplete it seems like it's firing before the upload is complete.
Here is the cfmodule:
<cfmodule template="/upload/cfmu/uploader.cfm"
basePath="/upload/cfmu/"
id="filter-uploader"
title="DocumentManager Document Uploader"
width="400"
height="300"
url="/upload/uploadAndInsert.cfm?bucketName=#bucketName#%26formField=#formField#%26fileName=#fileName#%26fileAction=#fileAction#%26folderName=#folderName#%26title=#title#%26description=#description#%26recipientID=#recipientID#%26loggedInUserID=#loggedInUserID#"
dir="#expandPath('.')#\images\"
filters="#filters#"
onComplete="reloadPage" />
and this is the script I'm calling:
function reloadPage(){
window.location.reload();
}
#7 by Dan Vega on 7/29/09 - 1:32 PM
#8 by Ken Smith on 8/3/09 - 2:48 PM
Maybe I don't understand, but on your onComplete.cfm example, if you just put an alert in the logFiles function, and then try to upload 20 images, the alert comes back immediately, while the files are still being uploaded in the background. This would work if your upload is instantaneous, but we are actually sending all of these images to Amazon s3, and it takes up to a couple of seconds per file.
From what I can gather, when the oncomplete fires, it has called the uploader page for each file, but those pages have not come back yet.
Would it be possible to get the flex source for the cfmu.swf file? I think we can leverage a callback function to let cfmu.swf know that the upload function has finished.
#9 by Ken Smith on 8/3/09 - 3:01 PM
<cfscript>
go_to = createObject("java", "java.lang.Thread");
go_to.sleep(10000);
</cfscript>
#10 by Adam Lepp on 8/3/09 - 4:00 PM
I'm doing some some image resizing and database inserts from there and need to wait until the those are done before letting the onComplete execute.
Thanks,
Adam
#11 by Dan Vega on 8/3/09 - 4:17 PM
#12 by Adam Lepp on 8/3/09 - 4:19 PM
onComplete - after each file upload
onCompleteAll - after all files are uploaded
Thanks,
Adam
#13 by Dan Vega on 8/3/09 - 4:24 PM
onComplete="yourFuncName"
onCompleteAfterEach="true|false"
onCompleteAfterAll="true|false"
onComplete="yourFuncName"
onCompleteRun="aftereach|afterall"
#14 by Dan Vega on 8/3/09 - 9:34 PM
Anyone willing to test this for me before I push this up to RIAForge? Thanks for you help guys!
#15 by Ken Smith on 8/4/09 - 12:38 PM
Thanks,
#16 by Ken Smith on 8/4/09 - 12:42 PM
#17 by Dan B. on 8/17/10 - 3:04 PM
Using flash player 10,1,82 the "onComplete" doesn't seem to function. In fact it seems like it is silently failing with some sort of error there and not calling the javascript, and not proceeding to the next file.
Is there something I can do to fix this? I'm not on CF9 on all my sites yet so can't use the new fileuploader built-in to cf9.
Dan
#18 by Kris on 3/8/11 - 5:00 AM
Let me say how great this is, I want to implement it into my site but there is one issue holding me back
The maxfilesize attribut is not working on my local server or webhosted server.
It displays the message correctly if the file does exceed the maxFileSize but if you up the value to say maxFileSize="300000" and upload an image below that value it just doesn't show up in the list and can't be uploaded.
Could the message be a bit more friendly like "The file 123.gif exceeds the max file size of 300kB" instead of "The file 123.gif exceeds the max file size of 300"
thanks for otherwise a great application
p.s. I tried in IE8 and FF3.6.15
Kris
#19 by notverybright on 4/27/12 - 12:37 AM
I'm also having problems with the onComplete function. It seems it's failing and not generating any errors. The function is not even called, i think. I'm using flash version 11.2.202.233 on Windows 7 (64-bit).
Regards
notverybright
#20 by notthatbright on 4/27/12 - 1:21 AM
Additionally this is what i get as output from flash
Error: Error #2014: Feature is not available at this time.
at flash.net::FileReference/get data()
at flash.external::ExternalInterface$/_objectToJS()
at flash.external::ExternalInterface$/_toJS()
at flash.external::ExternalInterface$/call()
at cfmu/uploadComplete()
Regards
-not that bright
#21 by Dan Vega on 5/14/12 - 8:51 AM