Tuesday, January 5, 2016

What about uploadAll?

Raymond Camden raised a good point: why not just use cffile uploadAll?

The reason is that uploadAll provides no facility for determining what field the uploaded file came from. It just copies every file that was submitted into the folder.

But sometimes, it matters very much where a file came from. In my case, users were primarily uploading a file (or sometimes a group of files) to the system which the system would then read through and import. At the same time, they also needed to upload an arbitrary number of documents which the system would associate with the import, but which were only there for human consumption. The way I needed to treat these two groups of files was very different, and uploadAll gave me no way to distinguish between them. UploadMultipleFiles() does.

No comments:

Post a Comment