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

Mime Type

Participant ,
Oct 10, 2013 Oct 10, 2013

I'm having trouble pinpointing if anything changed with the cffile upload mime type in CF10.  It was working fine in 9, but I'm getting the following error when uploading a jpg file type in CF10.

The MIME type or the Extension of the uploaded file image/jpeg was not accepted by the server.
Error detail - Only files of type image/* can be uploaded.

<cffile

            action="upload"

            filefield="Picture"

            destination="\\#expandpath('/')#CompanyPictures\"

            nameconflict="overwrite"

            accept="image/*">

1.3K
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
Enthusiast ,
Oct 10, 2013 Oct 10, 2013

Ensure that your server has a registered mime type for JPEG (.jpg, .jpe and .jpeg files that is set to image/jpeg).  If your server only has an extension setup for one type and you upload a different, it may not detect it properly.

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
Participant ,
Oct 10, 2013 Oct 10, 2013

That's what i was leaning toward.  I thought it used to be setup in CF Admin, but I couldn't find it.  Thank you for the tip.

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
Enthusiast ,
Oct 10, 2013 Oct 10, 2013

To my knowledge, at least for IIS, it will determine the file type before it handles the request off to CF.  We had an issue a while back where our system used JPEG files with a .mug extension, so even though it was a JPEG file, our system kept repeating that it wasn't an acceptable mime type until we popped .mug in as image/jpeg into IIS' mime types, and then everything moved forward.  Hoping the same happens here.

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
Participant ,
Oct 10, 2013 Oct 10, 2013
LATEST

Thank you!

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