Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFFILE / error upon execution 1

Status
Not open for further replies.

josel

Programmer
Joined
Oct 16, 2001
Messages
716
Location
US
All I am playing with is input to ask for file to be uploaded with action template which executes the cffile tag.

The file I am uploading is within same server (W2K). The source file is c:\Documents and Settings\My Documents\My Images\uploadthis.jpg. If you notice the error, it says that object is not found. The error also shows what the variable myFile holds and it appears to be a temporary copy created by CF. So, I conclude that CF is not able to create this file thus unable to be uploaded by CFFILE.

I checked for file c:\winnt\temp\ACF22.TMP and it is not there. Every time I try, the counter increments (ACF24 ...). Is this a share/permission issue?

Thank you all in advance;

josel


Two simple sets of code:

<!--- template to ask for file to be uploaded --->

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>

<html>
<head>
<title>CFFILE Upload screen</title>
</head>

<body>
<h3>CFFILE Upload screen</h3>

<form action=&quot;uploadImageComplete.cfm&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;>
Name of file:<br>
<input type=&quot;file&quot; size=&quot;60&quot; name=&quot;myFile&quot;>
<br>
<input type=&quot;submit&quot; value=&quot;Upload&quot;>
</form>

</body>
</html>


<!--- template to upload file --->

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>

<html>
<head>
<title>CFFILE - Successful</title>
</head>

<body>
<cffile
action=&quot;upload&quot;
filefield=&quot;myFile&quot;
destination=&quot;c:\inetpub\
File Was sucessfully uploaded!


</body>
</html>

<!--- Error I get upon submitting --->

Error Occurred While Processing Request
Error Diagnostic Information
An error has occurred.


HTTP/1.0 404 Object Not Found

----------------------------------------------------

Execution Time

0 milliseconds

-----------------------------------------------------Parameters
Form Fields:

FIELDNAMES=MYFILE
MYFILE=C:\WINNT\TEMP\ACF22.tmp

If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
everything appears fine here and I am in a habbit to start debugging from simplest things and work it out toward more complicated problems; for starter, can you make sure that the template name from:

<form action=&quot;uploadImageComplete.cfm&quot;...

is match with:
&quot;<!--- template to upload file --->&quot;... Sylvano
dsylvano@hotmail.com
 
I find it amusing that I cannot employ my background as a programmer while trouble-shooting CFML/HTML. I guess that not been aquinted with the meaning of the errors and, what would be normal sequence of steps to follow based on errors ... plays a big role on why is it that I am having a hard time with simple things :)

In the other hand, writing code straight out of a book, and doing nothing more than to match what I type with what's on the book, is rapidly proving to be a poor aproach to fixing problems.

To answer your question more directly, that was exactly the problem. The code I am copying from (a book I am reading) also has the same missmatch of naming thus leading me into a trap!

Thank you very much;

josel


PS: I just may become very good at trouble-shooting by the time I am through with the book! :)
If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top