CFFILE/Upload Issue I ran into

This post is more than 2 years old.

A few days ago I was debugging an issue with Canvas when I ran across an interesting issue with CFFILE, action=upload. The user reported that the files he uploaded via the wiki were not visible. With some debugging, I found that files named foo.whatever ended up being upload to a folder with the same name as the filename, so instead of having the file end up here:


They ended up here:


After an hour or so of debugging, I finally noticed something. The code to handle the uploads was specifying a path and filename for the destination. The docs for cffile/action=upload say that destination has to be directory. But apparently this has worked for quite sometime, except in ColdFusion 7.0.1 where the behavior was broken. This hotfix was released just to correct this issue.

This is probably just one more little facet of CFML I've forgotten, although I will say the docs should be updated to make this more clear.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate for HERE Technologies. 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. You can even buy me a coffee!

Lafayette, LA