tracker issue : CF-3431165

select a category, or use search below
(searches all categories and all time range)

CFFILE - Unable to set MS Office MIME Types if OpenOffice installed

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/CannotReproduce

Reporter/Name(from Bugbase): Stephen Walker / Stephen Walker (Stephen Walker)

Created: 12/18/2012

Components: Document Management

Versions: 10.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: Final /

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

Problem Description: When OpenOffice is installed and set in the CF Administrator, you no longer have the ability to use Microsoft Office MIME type in the "accept" attribute of the cffile tag.  You must use application/x-tika-msoffice (doc, ppt, xls) or application/x-tika-ooxml (docx, pptx, xlsx) which accepts all office MIME types and does not give you the granularity that might be required to prevent certain file types from being uploaded.  I suspect this is also an issue with CF9.

Steps to Reproduce: Install OpenOffice, build a simple cffile upload form and set the accept attribute to application/msword.  Upload a standard word file(.doc).

Actual Result: You will receive an error that the file was of the type application/x-tika-msoffice and was not accepted by the server.

Expected Result: The word file should be uploaded without issue.

Any Workarounds: Uninstall OpenOffice or be willing to accept all formats.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3431165

External Customer Info:
External Company:  
External Customer Name: Stephen.Walker
External Customer Email:  
External Test Config: My Hardware and Environment details: Windows 2008 R2, IIS 7.5, ColdFusion 10 hotfix 6



Since this appears to be the result of passing the file through OpenOffice and having the MIME type changes, I would recommend an attribute "useOO (true/false)" to bypass this process. Default should be false to prevent errors if OpenOffice is not installed.
Comment by External U.
16888 | December 18, 2012 07:13:28 AM GMT
unable to repro the issue on an unpatched CF10 (on Win2008R2 / IIS / OO3.3). accept = "application/msword" works on a .doc file with or without OO. @Stephen can you try strict="false" parameter with the cffile tag to see if there's any change in the behavior.
Comment by Piyush K.
16889 | July 24, 2013 08:58:06 AM GMT
New servers installed without OO. When a user attempts to upload a docx when the mime type is set for a doc (app/msword), the error is the same, but at least it seems to upload without issue once the correct MIME type is selected.
Comment by External U.
16890 | October 30, 2013 02:07:01 PM GMT
I'm experiencing the same problem but do not have OpenOffice. Also our form accepts (*/*) all types. Is this a ColdFusion server or IIS issue?
Comment by External U.
16891 | September 15, 2014 07:13:07 AM GMT
@devdumper Which CF version are you using? As stated by Piyush earlier this issue can not be reproduced on an unpatched CF10 (on Win2008R2 / IIS / OO3.3).
Comment by Uday O.
16892 | November 24, 2014 05:49:12 AM GMT
re-verified with CF10 update14 on Windows x64 / OpenOffice 4. MIME type "application/msword" works to upload ".doc" files with and without OpenOffice. "application/x-tika-ooxml" is accepted for .docx files. CF11 uses a new tika library and accepts "application/x-tika-msoffice" for .doc and "application/x-tika-ooxml" for .docx files closing this. Test code: <cfif isDefined("Form.FileContents") > <cffile action = "upload" fileField = "FileContents" destination = "#expandpath("./")#" accept = "application/msword" nameConflict = "MakeUnique"> <cfelse> <form method="post" action=<cfoutput>#cgi.script_name#</cfoutput> name="uploadForm" enctype="multipart/form-data"> <input name="FileContents" type="file"> <br> <input name="submit" type="submit" value="Upload File"> </form> </cfif>
Comment by Piyush K.
16893 | December 03, 2014 01:22:30 PM GMT
If you dump the "file" scope after uploading, for .docx you get the CONTENTSUBTYPE as CF9: vnd.openxmlformats-officedocument.wordprocessingml.document CF10/CF11: x-tika-ooxml Similarly, for .xslx you get the CONTENTSUBTYPE as CF9: vnd.openxmlformats-officedocument.spreadsheetml.sheet CF10/CF11: x-tika-ooxml The behavior of MIME is different with MS Office 2013, Windows 7 x64, CF9/CF10/CF11 x64.
Comment by Anit K.
16894 | December 03, 2014 01:40:02 PM GMT
ColdFusion 11 is fantastic! Just like Microsoft Windows Server! I don't know why anyone would use such terrible software like linux or php. If there is still anyone out there using linux or php, I urge you to switch over to ColdFusion and Microsoft Windows Server before it's too late.
Comment by External U.
16895 | May 12, 2015 09:08:04 AM GMT