ColdFusion's Multi File uploader is impacted by debugging

Ok, so this probably falls into the realm of “Obvious”, but both myself and a reader were surprised by this. Credit for it goes to John Pansewicz. He pinged me earlier this week saying that ColdFusion 9’s multi file uploader failed to work for him. No matter what he uploaded he got a bad result. I tried the same code on my machine and saw nothing wrong. Then John figured out that it was ColdFusion debugging breaking the response. Again - obvious - but I tend to only worry about debugging when running against CFCs and Ajax applications. The multi file uploader is a Flash application and it just didn’t occur to me that I had to be concerned about it. However - if you look at the docs for the feature (see here) you can see that JSON must be output to the control for it to know how the files were processed. Anything that breaks that JSON (including ColdFusion debugging) will make the control think the files had an error during the upload.

Finally - don’t forget that you can turn off debugging on a request by request basis. Don’t think you must completely turn off the feature if you have one bit of JSON in your local project. Just make use of the cfsetting tag to disable it for that particular request.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support.

Lafayette, LA