RobotMan
asked on
Upload a File using CFFILE
I want to be able to upload a file that the user chooses. This is the code I have used:
<CFFORM action="added.cfm" method="post" name="Archive">
<input type="file" name="path">
<CFFILE action="upload" filefield="path" destination="C:\Inetpub\ww wroot\CFDO CS\Project 2\files\" nameconflict="overwrite">
<input type="submit" value="Archive File">
</CFFORM>
All on the same page. However, I get the error:
Error Occurred While Processing Request
Error Diagnostic Information
The form field specified in the CFILE tag(PTAH) does not contain an uploaded file. Please be sure that you have specified the correct field name.
The erroro occured while processing an element with a general identifier of (CFFILE), occupying the document position (91:7) ti (91:128).
What am I doing wrong?
PS I am willing to change the point value, it just seems as though this should be a really easy question.
Thanx,
Abram Weas
Schlumberger Acquisitions Systems Intern
aweas@austin.apc.slb.com
<CFFORM action="added.cfm" method="post" name="Archive">
<input type="file" name="path">
<CFFILE action="upload" filefield="path" destination="C:\Inetpub\ww
<input type="submit" value="Archive File">
</CFFORM>
All on the same page. However, I get the error:
Error Occurred While Processing Request
Error Diagnostic Information
The form field specified in the CFILE tag(PTAH) does not contain an uploaded file. Please be sure that you have specified the correct field name.
The erroro occured while processing an element with a general identifier of (CFFILE), occupying the document position (91:7) ti (91:128).
What am I doing wrong?
PS I am willing to change the point value, it just seems as though this should be a really easy question.
Thanx,
Abram Weas
Schlumberger Acquisitions Systems Intern
aweas@austin.apc.slb.com
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am going to try the example. Thanx for the help guys.
ASKER
Adjusted points from 15 to 30
ASKER
Thanx Nathans...
(One of the smartest people I know is named Nathan -- maybe that is just a theme)
I got the code to work perfectly. I may have more questions later concerning this, but you really helped me leap this hurdle.
(One of the smartest people I know is named Nathan -- maybe that is just a theme)
I got the code to work perfectly. I may have more questions later concerning this, but you really helped me leap this hurdle.
ASKER
This was just what I needed...
Thank you for helping me out.
I am new to this points thing -- I hope that you got enough.
Thank you for helping me out.
I am new to this points thing -- I hope that you got enough.
That's where the FORM variable containing the uploaded file is available..you can't do it all on the same page because the form doesn't get submitted until they press the submit button..
Also, I checked some code that I am using and I have ENCTYPE="multipart/form-da