Skip to main content
Participant
August 11, 2009
Question

Accept="image/pjpeg" is not accepted

  • August 11, 2009
  • 4 replies
  • 1849 views

After building a file upload function, I realized I had to add image/pjpeg to my list of accepted mime types for the function to work in IE. However in doing so, CF throws the following error:

Complex object types cannot be converted to simple values.

The function works fine in Firefox without the mime type in the "accept" parameter, however IE won't allow progressive image to upload.

Here's my cffile tag:

          <cffile action="upload"
              destination="#REQUEST.UploadPath#"
              filefield="file#qry_getOrder.currentrow#"
              nameconflict="makeunique"
              accept="image/jpg,image/pjpeg,image/jpeg,image/gif,image/png,image/tif,image/tiff" />


This topic has been closed for replies.

4 replies

BKBK
Community Expert
Community Expert
December 16, 2009

This adds to what Mack said. Coldfusion might be choking on the word file. Replace file with uploadFile in the form, and see what happens.

Participating Frequently
December 15, 2009

Adding image/pjpeg to the list of accepted mime types does not work. I had a similar problem trying to upload jpegs into a photo gallery on a website. The p in pjpeg stands for Protected. The jpeg has been copyright protected and that's why it won't upload in many systems and galleries. For a complete explanation and fix see http://www.evolve.co.nz/how-to-fix-a-pjpeg-image-upload-error.html

Participating Frequently
August 13, 2009

The error does not seem to be related to the code you've shown. In my

experience the error appears when you try to use a complex object

(struct, array, cfc, etc) in a string context, for example:



]]>

Check your code to see if the line of the error is really cffile line.

Mack

August 12, 2009

This indicates that IE doesn't like how the file was saved and FF just treats it as a jpeg.

http://74.125.113.132/search?q=cache:rxvgJepHunIJ:www.experts-exchange.com/Software/Server_Software/Web_Servers/ColdFusion/Q_22807926.html+pjpeg+ie+upload+issue&cd=5&hl=en&ct=clnk&gl=us

Go MS

Byron Mann

mannb@hostmysite.com

byronosity@gmail.com

Software Architect

hosting.com | hostmysite.com

http://www.hostmysite.com/?utm_source=bb