Hi all:
I've been wrestling with putting SWFUpload into a Coldfusion app for several days now. I've gotten it to the point that it will tell me that it's uploading a file and that the Upload Cycle is complete. But when I go to look for the file it's not there.
I was hoping that someone here got it running on a CF server and could give me some assistance as to what I'm not doing (or doing wrong) so I can get past this hurdle. I'm running the app on Win 2K3 if that makes any difference.
Thanks in advance for any help,
Craig
CF and SWFUpload
Craig,
Funny, this is my first post, but I hope it helps. It seems like you and I are on the same road. I have a solution - I downloaded CFEasyalbum, (http://cfeasyalbum.riaforge.org/) written by vince collins. Kudos to Vince for this work! Since he uses SWFUpload as a part of his application this got me started with the deconstruction. I finally isolated the required cfm templates/required files to get this running. My (Very crude example) is here . Though you cannot see it, this does successfully upload the files to my server. Only jpg,gif,png files can be uploaded. You could change this in the javascript. I am still tweaking this, because I do want to use a database-whch differs from how vince used it. I no longer use any of the cfeasyalbum framework, but I never changed the file structure. If you like I can email you my code- but know that it is 90% built on vince's work
MichaelLKea#Gmail.com
**note** change the # to @ for my address
re: Coldfusion example?
@Craig328
I'm trying to attempt the same feat. Unfortunately its a slow going process as I can get it to upload only the first file, though the others don't get uploaded for some reason.
@Nemesis_Enforcer
Vincent's implementation currently uses the first version of SWFUpload and not the most recent release.
As is stands there's no documentation for version 1 on this site so trying to implement Vincent's work is a bit difficult as well, especially if you need to customize certain things after you get the crude version working.
SWFUploader and ColdFusion
I am using SWFUploader with ColdFusion 8 and have no problem uploading and capturing multiple files. By the way, it WON'T WORK under any condition if you are just pointing to a directory and not a file inside the directory (like index.cfm).
After you satisfy that requirement, use some CFFILE code in index.cfm (or whatever you call the handler file) to do something with the files once they are uploaded, otherwise CF just uploads the files into its tmp directory and then immediately deletes it.
The file post name sent by SWFUploader is called FILEDATA. So you want to use "FILEDATA" in your CFFILE file parameter, like this:
<cffile action="upload" filefield="filedata" destination="[whatever]" nameconflict="makeunique">The destination can be the same upload folder specified in the Ajax, doesn't matter where you tell CFFILE to put it.
Reply if you are still having trouble. Be sure to look at both your CF and web server log files for error data to help troubleshoot.
Also, you might be interested in the YUI Uploader: http://developer.yahoo.com/yui/uploader/ It works under the exact same principles, and while the demos are not as slick as for SWFUploader, you can still customize it any way you want and have full control over every aspect. The YUI documentation is very good, and there is a Yahoo group with engineers on hand to help answer your questions.
Finally, if you need to upload more than 2Gb, or want an uploader that has a progress bar and works with FTP, check out this java applet: http://jupload.sourceforge.net/advanced_js_demo.html I don't usually like applets, but this one does everything. I handles files larger than 2Gb by chunking them, then you just need to join the files on the back-end using any number of file joining utilities (even ColdFusion can do this).