Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Examples and how to

REST API: content-disposition: inline is limited to certain MIME types

Last updated on 21 December 2023 · 1 min read

Admin
REST API

Overview

You can download files via the M-Files REST API. In some situations, you may be using that to show content inline in other web sites by relying on the Content-Disposition: inline HTTP header.

As of the 23.10 release (October 2023), you may be unable to use it as expected for all files, you may get Content-Disposition: attachment instead.

Details

This value is limited to certain MIME types that are deemed safe for security purposes to prevent potential XSS issues.

The MIME types that can still be sent inline at the time of writing are the following, grouped by categories for easier reading:

General:

  • application/pdf
  • application/octet-stream
  • text/plain
  • text/richtext
  • image/*
  • audio/*
  • video/*

Excel:

  • application/vnd.ms-excel
  • application/vnd.ms-excel.addin.macroEnabled.12
  • application/vnd.ms-excel.sheet.binary.macroEnabled.12
  • application/vnd.ms-excel.sheet.macroEnabled.12
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • application/vnd.openxmlformats-officedocument.spreadsheetml.template

Word:

  • application/msword
  • application/vnd.ms-word.document.macroEnabled.12
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/vnd.ms-word.template.macroEnabled.12
  • application/vnd.openxmlformats-officedocument.wordprocessingml.template

PowerPoint:

  • application/vnd.ms-powerpoint
  • application/vnd.ms-powerpoint.template.macroEnabled.12
  • application/vnd.ms-powerpoint.addin.macroEnabled.12
  • application/vnd.openxmlformats-officedocument.presentationml.presentation
  • application/vnd.ms-powerpoint.presentation.macroEnabled.12
  • application/vnd.openxmlformats-officedocument.presentationml.template
  • application/vnd.openxmlformats-officedocument.presentationml.slideshow
  • application/vnd.ms-powerpoint.slideshow.macroEnabled.12

Notes

  • This may affect other features in your Classic Web access in case you use settings that show data inline - the "Open File In Tab" and "Open Files in Browser" settings, and the showopendialog URL argument for link (if you add it as 0).
  • This improvement is also available in LTS versions LTS 23.2 SR4 (23.2.12340.16) and 23.8 SR1 (23.8.12892.10).

Still need help?