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

Cannot Preview Large Files in Web (Max Preview Size)

Last updated on 29 December 2023

Admin
Preview

Overview

When you preview files in M-Files Web Client, those files are converted to a PDF file for display. In some cases, the Desktop client also converts files to a PDF for display (for example, to add the yellow search hit highlighting).

When the file is larger than certain limits, the preview operation will not succeed, and you will see a message similar to "Preview unavailable. The file is either too large or of an unsupported format. You can open the file to view its content".

Here is how this looks like in the new web client: 

image.png

When a user tries to get a preview of such a file in the Classic Web client, a Warning entry is recorded in the Windows Event Log of the M-Files Server machine. It will be like the following one. This will be present if the file size exceeds allowed limit only.

M-Files Online

My Vault {8CD62691-F7C2-4100-959C-29F7756CE264}

Conversion of the file "I am too large.ppt (2, 2-1)" to PDF format failed.

The size of the file (10785280 bytes) exceeds the maximum file size (2000000 bytes) specified for PowerPoint conversions.

ViewerFiles.cpp, 1161, Conversion of the file "I am too large.ppt (2, 2-1)" to PDF format failed. (0x80040122)

ViewerFiles.cpp, 1161, The size of the file (10785280 bytes) exceeds the maximum file size (2000000 bytes) specified for PowerPoint conversions. (0x80131600)

(M-Files 21.12.10943.6)

Where the file name and size are indicated, and the maximum allowed size for the file type.

Solution

Desktop and Classic Web

The size limit for the Classic Web and the Desktop clients are defined in the M-Files Admin - there are settings for several common document formats. The screenshot below highlights the maximum allowed size for PowerPoint files.

To change those limits:

  1. Expand the desired vault in the tree on the left-hand side.
  2. Select its Configurations node.
  3. Expand Advanced Vault Settings > Configuration > PDF Conversion.
  4. In the Configuration tab, expand the desired type of file (PowerPoint presentations in this example).
  5. Set the Maximum Source File Size to the desired limit in bytes (for example, 20MB is 209715200 bytes). The default limit is 10MB.

image.png

New Web Client (formerly known as vNext)

You can monitor the release notes for an item with ID 162321 that will provide the ability to configure the conversion size limit for the new web client.

As of the 23.12 (December 2023) release, the limits were increased. You can see the current limits in the following article: Document Preview - The maximum file size for document preview in M-Files Web.

For older versions, the default limit of 10 MB applies to the Web client and larger files will not generate a preview. The exception to this 10 MB limit is the limit of 1 MB when previewing Excel files.

Another option (workaround)

There is a setting, however, that allows you to use the PDF preview feature that comes with the browser, instead of the one that the M-Files client carries. Browsers typically don't have such a limit and may be able to preview larger files. We cannot guarantee, however, that they will be able to generate a preview for all files.

To have your users rely on the PDF previewer that comes with their browser (modern browsers like Chrome, Edge, Firefox have one), do the following steps. Note that they require that central client settings management is enabled.

  1. Expand the desired vault in the tree on the left-hand side.
  2. Select its Configurations node.
  3. Expand Advanced Vault Settings > Configuration > Client.
    1. Ensure that Manage Client Settings Centrally is set to Yes (if not, read the information carefully).
  4. Expand Web > PDF Viewer.
  5. Set Viewer Type to Browser.

image.png

Still need help?