Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
newcf #1
upload multiple files
Hi,
I have the form where user can upload max to three files at the same time.
Also the file is need to be overrtie if user try to post the same file again.
My code is only upload one file. Please review the code and tell me what did I
do wrong here
Thanks----------
===========
<cfif ISdefined("submit")>
<cfif submit eq "Save">
<cffile destination="#filedirectory#" action="upload"
nameconflict="overwrite" filefield="MSG_FILE">
</cfif>
</cfif>
<div align="center">Upload New File</div>
<cfform action="" method="POST" enctype="multipart/form-data">
<table align="center"><tr><td align="center">
<table width="600" border="1" cellspacing="0" cellpadding="5"
bordercolor="Navy" nowrap="YES" title="Create Posting">
<tr>
<th class="thr" title="Upload Job File">
Upload Job File
</th>
<td class="name2">
<input type="File" name="MSG_FILE" size="30" maxlength="30"><br>
<input type="File" name="MSG_FILE" size="30" maxlength="30"><br>
<input type="File" name="MSG_FILE" size="30" maxlength="30">
</td>
</tr>
<tr>
<td colspan="2" align="center" class="name2">
<div align="center">
<input type="Submit" name="submit" value="Save"
title="Submit">
<input type="button" onclick="history.go(-1)" value=" Cancel " title="Cancel">
</div>
</td>
</tr>
</table>
</cfform>
newcf Guest
-
upload multiple files is this possible?
Hi guys! is this possible to upload a whole directory or at least all files in a directory at once ? I know how to do it with 10 files then you... -
Upload of multiple files with Chilisoft
The webhotel I use has installed Chilisoft. I wish to make a webpage where it is possible to upload files. So far I have only been able to upload... -
[PHP] Multiple upload files with php problem!!
This is supported in the standards I think, as it says clearly in the HTML 4.01 specification on www.w3.org: "file select - This control type... -
Multiple upload files with php
Hi, I need to upload multiples files using php, but with the same "<input>" tag, somebody can help my, is this feature supported by php?. Anyboy... -
multiple files upload
Hi Group, In my program, the user has to be able to add one or more documents (as files) for one product from the database. The number of files... -
mattw #2
Re: upload multiple files
Try a different name for each input...
<input type="File" name="MSG_File_1"...
<input type="File" name="MSG_File_2"...
<input type="File" name="MSG_File_3"...
mattw Guest
-
-
newcf #4
Re: upload multiple files
Yes id did but it didn't work. Here is the code
<cfoutput><cfif ISdefined("Submit")>
<cfif Submit eq "upload">
<cffile destination="#filedirectory#" action="upload"
nameconflict="overwrite" filefield="#variables.filename#">
</cfif>
</cfif> </cfoutput>
<cfset numberoffields = 3>
<form action="" enctype="multipart/form-data" method="post">
<cfloop index="i" from="1" to="#variables.numberoffields#" step="1">
<cfset filename = "file" & #i#>
<input type="File" name="<cfoutput>#variables.filename#</cfoutput>" /><br
/>
</cfloop>
<input type="Submit" name="upload" value="upload" />
</form>
newcf Guest
-
jdeline #5
Re: upload multiple files
What is the error message? Remember, if variables.filename is undefined,
<cfif evaluate(variables.filename) neq ""> will cause an error. Check to see if it is defined first.
jdeline Guest



Reply With Quote

