You don't actually have the files in a file upload formfield if you're
just passing the string with the file location to the parent window.
You'll need to actually upload the file when you submit the pop-up
window. At least upload it somewhere to a temp directory. Then if you
want to move them enmasse to another location when you submit the main
form you can use cffile or cfftp. Make sense? The 'file' only exists in
the form with the file upload formfield. When you submit that form you
have the file available to the server (CF). If you don't take advantage
of it on that transaction, you lose it.

Greg

-----Original Message-----
From: cf coder [mailto:[EMAIL PROTECTED]
Sent: Friday, May 07, 2004 12:53 PM
To: CF-Talk
Subject: Re: cffile upload question

can I create form field on the server? something like this.

<cfif isDefined("form.submit")>
<cfparam name="finalFilePathList" default="">
<cfset count = 1>
<cfloop list="#form.hid_attachedFilesPath#" index="lFilePath">
<cfset lFilesToUpload = ListAppend(lFilesToUpload,lFilePath)>
<!---- SOMETHING LIKE THIS ---->
<cfoutput><input type="file" id="fileToUpload_#count#"
name="fileToUpload_#count#" value="#lFilePath#"></cfoutput>

<cfset count = count + 1>

</cfloop>

<cfset posn = 1>
<cfloop list="#lFilesToUpload#" index="fUpload">
<cffile action=""> filefield="form.fileToUpload_#posn#"
destination="#request.BlobsDir#"
nameconflict="MAKEUNIQUE"
accept="#fileMimeTypes#">

<cfset posn = posn + 1>
</cfloop>

Is this possible?
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to