I am testing cffile with action upload. I have written a program which is doing the uploads correctly, but it is also sending me an error message. The message appears to be wrong, but I can't figure out what needs fixing. The program:
<form method="post" enctype="multipart/form-data"
name="uploadForm" action= "#reppath#demos">
<input name="FileContents" type="file" >
<input name="submit" type="submit" value="Upload File">
</form>
<cffile action = "upload"
fileField = "FileContents"
destination = "#reppath#/demos"
nameConflict = "MakeUnique">
The error:
Invalid content type: ''.
The cffile action="upload" requires forms to use enctype="multipart/form-data".
The error occurred in /opt/coldfusion8/wwwroot/reports/frag5.cfm: line 20
18 : <cffile action = "upload"
19 : fileField = "FileContents"
20 : destination = "#reppath#/demos"
21 : nameConflict = "MakeUnique">
The form does include enctype="multipart/form-data" so I don't understand why I am getting this error. The upload is working and sending the chosen files to the destination folder.