Detecting format of uploaded Office docs

Has the library used to handle Office documents and detect their MIME type changed?

I have a form which uploads an .xlsx file, and only accepts those:

<cffile action="upload"
	destination="#expandPath( "../upload/contacts.xlsx" )#"
	nameConflict="overwrite" />

This used to work fine, but now rejects the file (Lucee 5.2.5). On investigation, the uploaded file, created in MS Office, has the MIME type application/x-tika-ooxml. Adding this as an accepted format fixes the issue, but this is not a change I was aware of…


1 Like

Hi Seb, see this ticket:

I have the same issue, this was changed some time ago, and is quite annoying actually. Hopefully this will be fixed soon, but is has something to do with the underlying JAVA libraries used for this purpose. There are some tickets on this already available:

So the Lucee-people are looking at it, but not solved for now.