Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Problem: Invalid content type: application/x-www-form-urlencoded.

New Here ,
Feb 13, 2011 Feb 13, 2011

I am running the code  below, but get the error "Invalid content type: application/x-www-form-urlencoded."   I don't know what this is telling me and how I can get the code to work.  It has worked in the past, but seems not to work now.

<CFFILE destination="#WritingSamplesInDirectory#"
        action="upload"
        nameconflict="MakeUnique"
        filefield="FileName"
        attribues="readONLY">

Any help greatly appreciated

9.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 13, 2011 Feb 13, 2011

You need to change your form's encoding to "multipart/form-data":

<form ... enctype="multipart/form-data">

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Translate
Community Expert ,
Feb 13, 2011 Feb 13, 2011

You need to change your form's encoding to "multipart/form-data":

<form ... enctype="multipart/form-data">

Dave Watts, CTO, Fig Leaf Software

http://www.figleaf.com/

http://training.figleaf.com/

Dave Watts, Eidolon LLC
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 19, 2011 Feb 19, 2011

Thanks, karolus


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 05, 2012 Oct 05, 2012
LATEST

There are three types of encoding format.  1. application/x-www-form-urlencoded     This is the default encoding format among HTTP requests.   2. multipart/form-data  3. text/plain For file upload , you have specify the enctype attribute of the form tag should be multipart/form-data .

HTML Training

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