tsgrp / HPI

OpenContent Management Suite (OCMS)
http://www.tsgrp.com/products
17 stars 5 forks source link

Cannot correctly set mimetype for .log or .dot files uploaded via ACA #2440

Closed katiebrill closed 3 years ago

katiebrill commented 3 years ago

Im finding that if I upload .log or .dot files through the share interface it gets the correct mimetype set, but if I upload it through ACA bulk upload its getting the mimetype set to application/octet-stream.

We have our own list of mimetypes coming from this oc-format-config.xml

Currently the .log extension is NOT in here at all and The .dot extension is configured as

<format fileExtension="dot" mimeType="application/dot"/>

but application/dot is not an actual mimetype - the mimetype for .dot files is application/msword

Solution:

To avoid any docs with the .log or .dot extensions get uploaded as application/octet-stream from ACA we must add

<format fileExtension="log" mimeType="text/plain" contentType="crtext" />

and update

<format fileExtension="dot" mimeType="application/dot"/>

To

<format fileExtension="dot" mimeType="application/msword"/>

In the oc-format-config.xml > contentFormats

katiebrill commented 3 years ago

Also should add .dotm >application/vnd.ms-word.template.macroEnabled.12 .in > text/plain .xlt > application/vnd.ms-excel .pps > application/vnd.ms-powerpoint

katiebrill commented 3 years ago

Commit to trunk and Merged to the 3.4.4 branch