tgilbreath
Programmer
Hi guys-
Basically, I've got a page that is displaying results from an Access DB that is comprised of inserts from a form. When the information is inserted, CFFILE is also being used to upload the file to a specified directory. However (and I've seen this problem in other forums, but NONE of the responses made any sense), when I try to call the uploaded filename (to make a link where the file can be immediately viewed), I get the following:
--------------------------------
C:\CFusionMX\runtime\servers\default\SERVER-INF\temp\--------------------------------
The neotmp.tmp file consists of 5 numbers that change with each file uploaded. I have seen the first response that says to make sure CF delimiters are not being used in the fileform call, which they are not. The db insert is working fine, as is the upload. It's simply calling back the name of the uploaded file that is producing this anamoly. Here is the code, any help would be very greatly appreciated!!!
=======================================================
UPLOAD/INSERT FORM
=======================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<cfquery name="ClientPopulate" datasource="ftp">
SELECT * FROM Clients
</cfquery>
<body>
<cfform action="file_upload.cfm" enctype="multipart/form-data">
<table width="350" border="0">
<tr>
<td><font face="verdana" size="1"><strong>Upload File:</strong></td>
<td><input type="file" name="FileName"></td>
</tr>
<tr>
<td><font face="verdana" size="1"><strong>File Title:</strong></td>
<td><input type="text" name="FileTitle"></td>
</tr>
<tr>
<td><font face="verdana" size="1"><strong>File Type:</strong></td>
<td>
<select name="FileType">
<option selected>Choose Type</option>
<option>Adobe PDF</option>
<option>Image - GIF</option>
<option>Image - JPEG</option>
<option>Document - MS Word</option>
</select>
</td>
</tr>
<tr>
<td><font face="verdana" size="1"><strong>Client:</strong></td>
<td>
<cfoutput query="ClientPopulate">
<select name="FileClient">
<option selected>Choose Client</option>
<option>#ClientName#</option>
</select>
</cfoutput>
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="Upload">
</td>
</tr>
</table>
</cfform>
</body>
</html>
=======================================================
UPLOAD/INSERT PROCESSING PAGE
=======================================================
<cffile action="upload"
filefield="Form.FileName"
destination="C:\Inetpub\dhilton\ftp\pdf\"
nameconflict="MakeUnique">
<cfset FileName="#cffile.serverFile#">
<cfinsert datasource="ftp" tablename="Files" dbtype="ODBC" formfields="FileName, FileTitle, FileType, FileClient">
<cflocation url="start_clientdhatemplate.cfm">
========================================================
FILE VIEWING PAGE
========================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<cfquery name="FileList" datasource="ftp">
SELECT * FROM Files
</cfquery>
<table width="600" border="0">
<tr>
<td><font face="verdana" size="1"><strong>[<a href="users.cfm">Users</a>] [<a href="upload_select.cfm">Upload</a>]</strong></td>
</tr>
</table>
<br>
<table width="750" border="0">
<tr>
<td><font face="verdana" size="1"><strong>Title</strong></td>
<td><font face="verdana" size="1"><strong>Name</strong></td>
<td><font face="verdana" size="1"><strong>Type</strong></td>
<td><font face="verdana" size="1"><strong>Client</strong></td>
</tr>
<cfoutput query="FileList">
<tr>
<td><font face="verdana" size="1">#FileTitle#</td>
<td><font face="verdana" size="1"><a href="../ftp/pdf/#FileName#">#FileName#</a></td>
<td><font face="verdana" size="1">#FileType#</td>
<td><font face="verdana" size="1">#FileClient#</td>
</tr>
</cfoutput>
</table>
</body>
</html>
=======================================================
Basically, I've got a page that is displaying results from an Access DB that is comprised of inserts from a form. When the information is inserted, CFFILE is also being used to upload the file to a specified directory. However (and I've seen this problem in other forums, but NONE of the responses made any sense), when I try to call the uploaded filename (to make a link where the file can be immediately viewed), I get the following:
--------------------------------
C:\CFusionMX\runtime\servers\default\SERVER-INF\temp\--------------------------------
The neotmp.tmp file consists of 5 numbers that change with each file uploaded. I have seen the first response that says to make sure CF delimiters are not being used in the fileform call, which they are not. The db insert is working fine, as is the upload. It's simply calling back the name of the uploaded file that is producing this anamoly. Here is the code, any help would be very greatly appreciated!!!
=======================================================
UPLOAD/INSERT FORM
=======================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<cfquery name="ClientPopulate" datasource="ftp">
SELECT * FROM Clients
</cfquery>
<body>
<cfform action="file_upload.cfm" enctype="multipart/form-data">
<table width="350" border="0">
<tr>
<td><font face="verdana" size="1"><strong>Upload File:</strong></td>
<td><input type="file" name="FileName"></td>
</tr>
<tr>
<td><font face="verdana" size="1"><strong>File Title:</strong></td>
<td><input type="text" name="FileTitle"></td>
</tr>
<tr>
<td><font face="verdana" size="1"><strong>File Type:</strong></td>
<td>
<select name="FileType">
<option selected>Choose Type</option>
<option>Adobe PDF</option>
<option>Image - GIF</option>
<option>Image - JPEG</option>
<option>Document - MS Word</option>
</select>
</td>
</tr>
<tr>
<td><font face="verdana" size="1"><strong>Client:</strong></td>
<td>
<cfoutput query="ClientPopulate">
<select name="FileClient">
<option selected>Choose Client</option>
<option>#ClientName#</option>
</select>
</cfoutput>
</td>
</tr>
<tr>
<td colspan="2">
<input type="submit" value="Upload">
</td>
</tr>
</table>
</cfform>
</body>
</html>
=======================================================
UPLOAD/INSERT PROCESSING PAGE
=======================================================
<cffile action="upload"
filefield="Form.FileName"
destination="C:\Inetpub\dhilton\ftp\pdf\"
nameconflict="MakeUnique">
<cfset FileName="#cffile.serverFile#">
<cfinsert datasource="ftp" tablename="Files" dbtype="ODBC" formfields="FileName, FileTitle, FileType, FileClient">
<cflocation url="start_clientdhatemplate.cfm">
========================================================
FILE VIEWING PAGE
========================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<cfquery name="FileList" datasource="ftp">
SELECT * FROM Files
</cfquery>
<table width="600" border="0">
<tr>
<td><font face="verdana" size="1"><strong>[<a href="users.cfm">Users</a>] [<a href="upload_select.cfm">Upload</a>]</strong></td>
</tr>
</table>
<br>
<table width="750" border="0">
<tr>
<td><font face="verdana" size="1"><strong>Title</strong></td>
<td><font face="verdana" size="1"><strong>Name</strong></td>
<td><font face="verdana" size="1"><strong>Type</strong></td>
<td><font face="verdana" size="1"><strong>Client</strong></td>
</tr>
<cfoutput query="FileList">
<tr>
<td><font face="verdana" size="1">#FileTitle#</td>
<td><font face="verdana" size="1"><a href="../ftp/pdf/#FileName#">#FileName#</a></td>
<td><font face="verdana" size="1">#FileType#</td>
<td><font face="verdana" size="1">#FileClient#</td>
</tr>
</cfoutput>
</table>
</body>
</html>
=======================================================