Copy link to clipboard
Copied
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/*">
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Thank you!