Skip to main content
Participant
June 1, 2009
Question

MIME Type Error re ms-excel where the file is a csv file

  • June 1, 2009
  • 1 reply
  • 508 views

I am trying to upload a file where the application accepts csv files but will not accept an Excel file.  But the problem is that the file I am trying to upload really is a csv file!  Among the steps I have taken to deal with this problem, with no success, are:  Change the default association of Excel with csv files and copied the data in question to a plain text editor and then saved it with a csv extension.  Nothing seems to work.   This problem is browser independent.  I have tried several different browsers, just to be sure.

The code executed on uploading the file reads, in pertinent part

<cffile action="upload" fileField="fileField" accept="text/csv,text/comma-separated-values,application/csv,application/x-filler" , etc.

Anyone have an idea why the application persists in thinking that the file I am uploading is being treated as if it were an ms-Excel file?

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    June 2, 2009

    The mime type of the uploaded file is sent by the browser and the CF

    application checks to see if it's in the list of accepted value (in

    other words it's not the CF application that determines the mime type,

    it's the browser/client operating system/etc). So you'll need to check

    what mime type is actually sent by the browser (you can use Fiddler to

    see exactly how the request looks like).

    Mack