Ok, now what if you want to upload an arbitrary number of files? You could just show them more inputs, but HTML5 added the very nice multiple attribute to the file input tag, allowing a user to select more than one file at a time.
Sadly, ColdFusion never really supported it. Until now, that is.
Yes, dear reader, I have cracked the code. This is why I was delving into the inner workings of the form object before. I knew the information I needed was had to be accessible somewhere, it was just a matter of finding out where. I've packaged up the functionality and published it at GitHub, ready for you to use yourself.
Usage is easy. Make sure that you have the multiple attribute on your form's file upload field.
Then, on the page that receives the form submission, make the following function call:
uploadedFiles = UploadMultipleFiles("fieldname", directoryToUploadTo)
The function will return an array of the paths to the newly uploaded files.