Copy link to clipboard
Copied
I have a form that can attach multiple files, it uses a bit of jquery
<cfform action="index.cfm" method="post" class="P10" style="padding:20px; border:1px solid red;">
<cfinput type="file" name="multi" class="multi" maxlength="2"/>
<input type="submit" name="submit" value="submit" />
</cfform>
The input is called multi, I presume it is an array or stucture. but how can i access the structure?
I tried <cfdump var="#FORM.mult[0]i#" /> but they do not seem to work? Any ideas?
Thanks,
H.
It rather looks like it isn't creating multiple fields but the file name as comma delimited list for that one field. You should be able to do the same thing easily with the new cffileupload tag in CF 9.
http://www.remotesynthesis.com/post.cfm/multi-file-uploads-with-coldfusion-9-in-5-lines
Copy link to clipboard
Copied
It rather looks like it isn't creating multiple fields but the file name as comma delimited list for that one field. You should be able to do the same thing easily with the new cffileupload tag in CF 9.
http://www.remotesynthesis.com/post.cfm/multi-file-uploads-with-coldfusion-9-in-5-lines
Copy link to clipboard
Copied
The previous answer told you it was a list. You can loop through that list to get the individual file names.
Copy link to clipboard
Copied
The input is called multi, I presume it is an array or stucture.
No, form.multi is a string
I tried <cfdump var="#FORM.mult[0]i#" /> but they do not seem to work? Any ideas?
Another reason that wouldn't work, aside from form.multi being a string, is that the variable is incorrectly spelt.
Copy link to clipboard
Copied
thanks, spelling error was only in my post, but you are right. must be a comma sep. list.
Thanks