I stumbled across what seems to be an undoented behavior in
ColdFusion MX that can simplify file uploads if it is reliable.

**** file: myform.cfm ****
<form action="loader.cfm" method="post" enctype=...>
<input type="file" name="foo" ...>

**** file: loader.cfm ****
<cfdump var="#form#">
<cffile action="read" variable="contents" file="#form.foo#">

If you look at the dump from loader.cfm, you will see a variable "foo"
(form.foo) which contains a path to a temporary file (generated by CF
server I assume) that is the uploaded file contents. It appears one can
simply read that file.

If this is a reliable behavior, then it reduces one having to
explicitly load to a file via CFFILE and then read it back in. I just
want the contents to be loaded into a database in this case; I don't
want to create lasting files so this is good. (I assume the CF server
eventually deletes the temporary file it created, just like most
internal temp files.)

I suspect this is under-doented because it is not associated with
any CF function or tag. It is just what the CF server does with HTTP
stuff from the INPUT HTML tag.

Has anybody used this extensively in production or know a formal
alternative to do the same thing to avoid explicit file creation?

Thanks, -T-