Question
file upload fails as tmp filename is returned
My problem is I cant upload a file using form input and
cffile upload functionality. The returned file is always something
like:
C:\CFusionMX7\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\neotmp48497.tmp
I have broken it down as much as possible to figure it out, leaving only a form input field for the file,
and a page which simply outputs the form data. It can be tested here:
http://daus.mediadogs.net/debug/
This is index.cfml :
<html>
<head><title>form problem</title></head>
<body>
<h1>Form problem: file returns as tmp name.</h1>
<cfform name="new_field" action="submit.cfml" method="POST" enctype="multipart/form-data">
<input type="file" name="filename"/>
<input type="submit" value="Upload file"/>
</cfform>
</body>
</html>
this is submit.cfml:
<html>
<head>
<title>Submit page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<cfoutput>
<cfdump var="#form#">
This file was chosen: #form.filename#
</cfoutput>
</body>
</html>
---
I have tested both with cfform and normal form, no luck. Appreciate all help !
C:\CFusionMX7\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\neotmp48497.tmp
I have broken it down as much as possible to figure it out, leaving only a form input field for the file,
and a page which simply outputs the form data. It can be tested here:
http://daus.mediadogs.net/debug/
This is index.cfml :
<html>
<head><title>form problem</title></head>
<body>
<h1>Form problem: file returns as tmp name.</h1>
<cfform name="new_field" action="submit.cfml" method="POST" enctype="multipart/form-data">
<input type="file" name="filename"/>
<input type="submit" value="Upload file"/>
</cfform>
</body>
</html>
this is submit.cfml:
<html>
<head>
<title>Submit page</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<cfoutput>
<cfdump var="#form#">
This file was chosen: #form.filename#
</cfoutput>
</body>
</html>
---
I have tested both with cfform and normal form, no luck. Appreciate all help !