I'll try and explain this better. I have a form on the main page. The form has a button that opens up a pop-up window. The pop-up window has the input type 'file' field. I have added code to allow users add more than one file at a time. I am not uploading the file to the server at this stage. Instead I am passing the list of files selected along with the complete file path back to the parent window. The parent window has a submit button. When the user hits on submit. I am looping through the list containing the file paths and want to upload them one by one to the server using the cffile tag.

Here is the code

<cfif isDefined("form.submit")>
<cfparam name="finalFilePathList" default="">
<cfloop list="#form.hid_attachedFilesPath#" index="lFilePath">
<cfset lFilesToUpload = ListAppend(lFilesToUpload,lFilePath)>
</cfif>

<cfloop list="#lFilesToUpload#" index="fUpload">

<cffile
action=""
filefield="#fUpload#"
destination="#request.BlobDir#"
nameconflict="MAKEUNIQUE"
accept="#MimeTypes#">

</cfloop>

Hope this gives you a better idea.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to