Friday, June 12, 2009

Serving correct MIME-types for Office 2007 attachments on the web

Several of our users had problems with opening Office 2007-attachments in Internet Explorer. The browser identified the attachments as zip files.

The workaround for this is to set up the Domino server to send the appropriate MIME-type header.

The correct headers

Then you need to configure the Domino Server. We hoped it would be as easy as adding config documents to the "File Identifications" view. Alas, this didn't work.

What did work was modifying the httpd file in the data-directory of the server/refreshing http
(tell http refresh).

#   Office 2007
AddType .docm application/vnd.ms-word.document.macroEnabled.12
AddType .docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
AddType .dotm application/vnd.ms-word.template.macroEnabled.12
AddType .dotx application/vnd.openxmlformats-officedocument.wordprocessingml.template
AddType .potm application/vnd.ms-powerpoint.template.macroEnabled.12
AddType .potx application/vnd.openxmlformats-officedocument.presentationml.template
AddType .ppam application/vnd.ms-powerpoint.addin.macroEnabled.12
AddType .ppsm application/vnd.ms-powerpoint.slideshow.macroEnabled.12
AddType .ppsx application/vnd.openxmlformats-officedocument.presentationml.slideshow
AddType .pptm application/vnd.ms-powerpoint.presentation.macroEnabled.12
AddType .pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
AddType .xlam application/vnd.ms-excel.addin.macroEnabled.12
AddType .xlsb application/vnd.ms-excel.sheet.binary.macroEnabled.12
AddType .xlsm application/vnd.ms-excel.sheet.macroEnabled.12
AddType .xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
AddType .xltm application/vnd.ms-excel.template.macroEnabled.12
AddType .xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template


Not sure if it is a bug that the "File Identifications" solution didn't work..? The server-version is Domino 8.5.

4 comments:

DiDu said...

According to Admin Help, File Identifications in Domino Directory is used only for correctly encoding attachments sent through SMTP/POP/IMAP nail, not used by Domino http.

DiDu said...

Oh, and thanks for the list. IMHO someone at IBM should add that to File Identifications out of the box, as well as make Domino http also use File Identifications instead of http.cnf

Admin said...

It is fixed i Domino 8.5.2

Jaime Bisgrove said...

Another "check" would be to make sure no compression (unsupported) has been added to the mime-type.

To check, go to Servers > All Server Documents > [your server] > Internet Protocols > HTTP > Zlib Compression Settings (this may be hidden by default).

To exclude office 2007 extensions, just add "application/vnd* to the "Exclude Mime Types" field.

I have used this compression setting to try and boost load times for uncompressed files. Try the following to speed up css and other uncompressed files files (note javascript is excluded do to issues with obfuscation):

Compress Mime Types: text/*, text\*, application/*.

Exclude Mime Types: 8/x*, text/javascript*, text\javascript*, text/html*, application/vnd*