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

Mime type Issue docx

New Here ,
Apr 20, 2009 Apr 20, 2009

Unable to upload docx files from systems which does not have ms office 200

Code : -
<cffile action="upload"
               filefield="browsefile"
               destination="#variabes.path#"
               nameconflict="makeunique"                        

accept="application/vnd.openxmlformats-officedocument.wordprocessingml.document,              

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
           
Also added mime type "application/vnd.openxmlformats-officedocument.wordprocessingml.document" in IIS

Still getting error.

Please help?                

7.2K
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 ,
Apr 21, 2009 Apr 21, 2009

Sorry,  Its not MS office 200 its MS office 2007

Please help me its urgent

Thanks

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
Contributor ,
Apr 22, 2009 Apr 22, 2009

What is the error message you are receiving?

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
Advisor ,
Apr 23, 2009 Apr 23, 2009

I also would like to see the error message you get, but I'll take a guess as to what the root of the problem is.  I suspect that computers without Office 2007 installed do not associate your expected MIME type with the docx file.  The accept attribute is constraining what MIME types are valid and the value being submitted is not one of these values.  Try removing the accept attribute from the CFFILE tag.  Instead of relying on the MIME type provided by the browser to verify you have a docx file check the uploaded file for the expected file extension.

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 ,
Apr 27, 2009 Apr 27, 2009

Got the error message

The MIME type of the uploaded file application/octet-stream was not accepted by the server.

<br>Only files of type application/vnd.openxmlformats-officedocument.wordprocessingml.document,

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet can be uploaded. <br>Verify that you are

uploading a file of the appropriate type.

While uploading a docX and XlsX files.

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
Advisor ,
Apr 28, 2009 Apr 28, 2009
LATEST

I suspect that the computers uploading these files do not associate the Office 2007 with the expected MIME types.

You have two options:

1. If you have access to the end user's PC you can modify the registry to associate the .docx and .xlsx extensions with the MIME types application/vnd.openxmlformats-officedocument.wordprocessingml.document and application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.

This works for Windows and Internet Explorer.  I'm not sure how you would do this on Linux or Mac.

2. Remove the accept attribute from CFFILE.  To restrict file types check the extension of uploaded files and delete those that are not permitted.

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