Guest_imported
New member
- Jan 1, 1970
- 0
HELLO,
I have an html form contains ListBox named (list2) and this list box items contains FILES PATHs and can be selected multipe To upload these files as follow:
<!--- FILE NAME : file.cfm --->
<FORM ACTION="fileaction.cfm" METHOD="Post">
<SELECT multiple name="list2">
</SELECT>
<input type="submit">
</FORM>
The action File is for get each file from each listbox items and then upload as in the following file:
<!--- FILE NAME : fileaction.cfm --->
<CFSET numberIngroup=10>
<CFSET employee_list=ArrayNew(1)>
<CFSET numberIngroup = #numberIngroup# + 1>
<CFLOOP from="1" to="#numberIngroup#" step="1" index="i">
<CFSET employee_list=#GetToken(FORM.list2, i, ","
#>
<CFIF employee_list neq "">
<CFSET file.clientfile = ''>
<CFIF trim(employee_list) NEQ ''>
<CFFILE action="UPLOAD" filefield="employee_list"
destination="#expandpath('./docs/')#" nameconflict="MAKEUNIQUE">
</CFIF>
<CFELSE>
<CFBREAK>
</CFIF>
</CFLOOP>
The promlem occured may be because the array (employee_list) items not a form field to put in filefield parameter in CFFILE tag.
Is There a solution for this problem..
Please Reply to me
Thanks
I have an html form contains ListBox named (list2) and this list box items contains FILES PATHs and can be selected multipe To upload these files as follow:
<!--- FILE NAME : file.cfm --->
<FORM ACTION="fileaction.cfm" METHOD="Post">
<SELECT multiple name="list2">
</SELECT>
<input type="submit">
</FORM>
The action File is for get each file from each listbox items and then upload as in the following file:
<!--- FILE NAME : fileaction.cfm --->
<CFSET numberIngroup=10>
<CFSET employee_list=ArrayNew(1)>
<CFSET numberIngroup = #numberIngroup# + 1>
<CFLOOP from="1" to="#numberIngroup#" step="1" index="i">
<CFSET employee_list=#GetToken(FORM.list2, i, ","

<CFIF employee_list neq "">
<CFSET file.clientfile = ''>
<CFIF trim(employee_list) NEQ ''>
<CFFILE action="UPLOAD" filefield="employee_list"
destination="#expandpath('./docs/')#" nameconflict="MAKEUNIQUE">
</CFIF>
<CFELSE>
<CFBREAK>
</CFIF>
</CFLOOP>
The promlem occured may be because the array (employee_list) items not a form field to put in filefield parameter in CFFILE tag.
Is There a solution for this problem..
Please Reply to me
Thanks