I'm trying to figure out how to use cffileupload so I have a braindead .cfm file:
<cffileupload
url="uploadFiles.cfm"
progressbar="true"
name="myupload"
addButtonLabel = "Add File"
clearButtonlabel = "Clear All"
width=600
height=400
title = "File Upload"
maxuploadsize="30"
extensionfilter="*.jpg, *.png, *.flv, *.txt"
BGCOLOR="##FFFFFF"
MAXFILESELECT=10
UPLOADBUTTONLABEL="Upload now"/>
which is the one from the documentation page. Where I'm losing it is in the processing file.
If the file contains only:
<cffile action="uploadall" destination="c:/testload" nameConflict="overwrite">
the files upload and no problems. The issue is that I want to do additional processing on
each file after it arrives. I've tried this:
<cfoutput>
<cffile action="uploadall" destination="c:/testload" nameConflict="overwrite">
<cfimage source="C:/testload/#CFFile.serverfile#" action="resize" width="300" height="" destination="c:/testload/small.jpg" overwrite="yes">
</cfoutput>
and the CFFILEUPLOAD status bar shows an HTTP 500 error.
Is the uploadFiles.cfm called for each file individually, i.e., if I upload
3 files, is it invoked three times? If so, how do I access the server side file name? If I use
CFFILE.serverFile, I get a HTTP 500 error. Or is this an array or CFFILE structures? I've
tried multiple different approaches and all I get is the HTTP 500 error. None of the examples
I can find explain this or show readable code. Thanks.