hello,
I looked through some of the other posts i have found referring to this error
and tried some of the solutons but i am still not finind the solution that will
work for me. I am new to coldfusion been using only a couple months so any
help would be appreciated.
I will post the code below here:
<cfparam name="url.st" default="true">
<cfparam name="url.sc" default="true">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Add Resource</title>
<link rel="STYLESHEET" type="text/css" href="cms.css">
</head>
<body>
<cfif isDefined("form.fieldnames")>
<cfset variables.content = form.content>
<cfset variables.content = replaceNoCase(variables.content,
"http://#cgi.server_name#/extranet/", "", "All")>
<cfset variables.content = replaceNoCase(variables.content, "&",
"&", "All")>
<!---cfset variables.numberoffields = "10">
<cfset variables.filelink = "">
<cfif isdefined("form.fileLink")>
<cfset message = "">
<cfloop index="i" from="1" to="#variables.numberoffields#" step="1">
<cfset filename = "form.fileLink" & #i#>
<cfif evaluate(variables.fileLink) neq "">
<cfif len(form.filelink)>
<cfset variables.destpath = ReplaceNoCase(expandPath("*.*"),
"admin\*.*", replace(request.FileLib, "/", "\", "All"))>
<cffile action="UPLOAD" filefield="form.filelink"
destination="#variables.destpath#" nameconflict="MakeUnique">
<cfset variables.filelink = cffile.serverFile>
</cfif>
</cfif>
</cfloop>
</cfif--->
<cfquery datasource="#request.dsn#"
name="qryAnnotationInsert">dbo.spAnnotationInsert #form.AnnotationGroupID#,
#form.countryID#, '#form.title#', '#variables.content#', <cfif
len(form.weblink)>'#form.weblink#'<cfelse>null</cfif>,
#request.user.userid#</cfquery>
<cfquery datasource="#request.dsn#"
name="qryAnnotationFileInsert">dbo.spAnnotationFileInsert #url.group#, <cfif
len(variables.filelink)>'#variables.filelink#'<cfelse>null</cfif>,
#request.user.userid#</cfquery>
<div align="center" class="smBlackText">
<br><br><br><br>
Resource Added
<br><br>
<input type="Button" value="Close Window"
onclick="window.opener.location.reload();self.close();" style="width:160px;">
</div>
<cfelse>
<form action="winAnnotationAdd.cfm" method="post"
enctype="multipart/form-data">
<input type="Hidden" name="AnnotationGroupID"
value="<cfoutput>#url.group#</cfoutput>">
<table class="smBlackText">
<tr>
<cfquery datasource="#request.dsn#"
name="qryCtry">spCountry</cfquery>
<td><b>Country:</b></td>
<td><select name="countryid" style="width:200px;"><option
value="Select Country"><cfoutput>Select Country</cfoutput><cfoutput
query="qryCtry"><option
value="#qryCtry.countryid#">#qryCtry.country#</cfoutput></select><br><br></td>
</tr>
<tr>
<td>Title:</td>
<td><input type="Text" name="title" size="50" maxlength="255"
value="" style="width:600px;"></td>
</tr>
<cfif isBoolean(url.sc) AND url.sc>
<tr valign="top">
<td>Content:</td>
<td><cfmodule template="../customtags/SBNEdit.cfm"
HTML="" fieldName="content" AppData="#request#" width="600" height="275"></td>
</tr>
<cfelse>
<input type="Hidden" name="content" value="">
</cfif>
<tr valign="top">
<td>Link:</td>
<td><input type="Text" name="weblink" value="" size="50"></td>
</tr>
<cfoutput>
<cfset variables.numberoffields = "10">
<cfloop index="i" from="1" to="#variables.numberoffields#" step="1">
<cfset filename = "file" & " " & #i# &":">
<cfset variables.filelink = "">
<cfif evaluate(variables.fileLink) neq "">
<cfif len(form.filelink)>
<cfset variables.destpath = ReplaceNoCase(expandPath("*.*"),
"admin\*.*", replace(request.FileLib, "/", "\", "All"))>
<cffile action="UPLOAD" filefield="form.filelink"
destination="#variables.destpath#" nameconflict="MakeUnique">
<cfset variables.filelink = cffile.serverFile>
</cfif>
</cfif>
<tr valign="top">
<td><cfoutput>#variables.filename#</cfoutput></td>
<td><input type="File" name="fileLink" size="50"></td>
</tr>
</cfloop>
</cfoutput>
<tr><td align="center" colspan="2"><hr size=1 color="silver"
noshade><input type="Submit" value="Add"
style="width:160px;"> <input type="Button" value="Close Window"
onclick="self.close();" style="width:160px;"></td></tr>
</table>
</form>
</cfif>
</body>
</html>
the form i am trying to base this multiple file upload from is as follows:
1 <cfset numberoffields = 10>
2 <cfif isdefined("form.upload")>
3 <cfset message = "">
4 <cfloop index="i" from="1" to="#variables.numberoffields#" step="1">
5 <cfset filename = "form.file" & #i#>
6 <cfif evaluate(variables.filename) neq "">
7 <cffile action="UPLOAD"
8 destination="c:cfusionmxwwwrootNAPAfiles"
9 nameconflict="OVERWRITE"
10 filefield="#variables.filename#">
11 <cfset message = message &
",File%20#i#%20(#file.serverfile#)%20was%20uploaded">
12 <cfelse>
13 <cfset message = message & ",File%20#i#%20was%20empty">
14 </cfif>
15 </cfloop>
16 <cflocation url="FileUpload.cfm?msg=#variables.message#">
17
18 <cfelse>
19 <h2>File Upload</h2>20 <cfif isdefined("url.msg")>
21 <div style="color:#FF0000;">
22 <cfloop list="#url.msg#" index="i">
23 <cfoutput>#i#</cfoutput><br />
24 </cfloop>
25 </div>
26 </cfif>
27 <form action="FileUpload.cfm" enctype="multipart/form-data" method="post">
28
32 <input type="Submit" name="upload" value="upload">
33 </form>
34 </cfif>
thanks in advance for your help.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301295
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4