Highlighted

cffile image

New Here ,
Jul 06, 2015

Copy link to clipboard

Copied

I am attempting to upload a photo and I keep getting errors.

    <cfform method="post" action= "test2.cfm" name="uploadForm" enctype="multipart/form-data">

    <cffile action = "upload"

        fileField = "FileContents"

        destination = "D:\home\manpcs.com\wwwroot\Realtor\images\"

        accept="image/*"

        nameConflict = "overwrite">

        <br>

        <input name="submit" type="submit" value="Upload File" > 

    </cfform>

Result

Invalid content type: ''.

The files upload action requires forms to use enctype="multipart/form-data".
The error occurred in D:/home/manpcs.com/wwwroot/Realtor/test.cfm: line 10
8 :         destination = "images\" 9 :         accept="image/*" 10 : nameConflict = "overwrite"> 11 :         <br> 12 :         <input name="submit" type="submit" value="Upload File" > 

Views

92

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

cffile image

New Here ,
Jul 06, 2015

Copy link to clipboard

Copied

I am attempting to upload a photo and I keep getting errors.

    <cfform method="post" action= "test2.cfm" name="uploadForm" enctype="multipart/form-data">

    <cffile action = "upload"

        fileField = "FileContents"

        destination = "D:\home\manpcs.com\wwwroot\Realtor\images\"

        accept="image/*"

        nameConflict = "overwrite">

        <br>

        <input name="submit" type="submit" value="Upload File" > 

    </cfform>

Result

Invalid content type: ''.

The files upload action requires forms to use enctype="multipart/form-data".
The error occurred in D:/home/manpcs.com/wwwroot/Realtor/test.cfm: line 10
8 :         destination = "images\" 9 :         accept="image/*" 10 : nameConflict = "overwrite"> 11 :         <br> 12 :         <input name="submit" type="submit" value="Upload File" > 

Views

93

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 06, 2015 0

Have something to add?

Join the conversation