Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/System setup and customization/Environment setup and maintenance/Server installation and maintenance

ViewerFiles folder is taking too much space and/or has recently grown in size

Last updated on 15 July 2022

Admin

Symptom

The ViewerFiles folder for the vault has grown very large and is taking up a lot of disk space on the M-Files server now. You may notice a growth increase after upgrading to the 22.1 or later release.

Can we purge some of these items and what method to use in order to do so?

Do we need to back it up?

Something like this is not unheard of in large vaults, especially those that imported/created a lot of content recently.

image.png

Details

By default, the location of this folder is something like

C:\Program Files\M-Files\Server Vaults\My Vault\ViewerFiles\PDF

It is part of the so-called secondary vault data, meaning - data that can be generated again based on the primary data (metadata structure, database and file data of the vault). Other such secondary data are search indexes.

So, while they can be re-generated if needed, this comes with certain precautions - for example:

  • If you lose/delete the search indexes, searches will not function until reindexing is done (and that can take a long time in large vaults, even weeks).
  • If you delete the PDF folder from ViewerFiles, the users will get the Preview generated slower in the desktop client, for both previews and search highlights, when that happens for the particular file. 
    • The needed files will be generated there when needed by an operation, so the folder size will increase over time.
  • A performance hit on the system while the re-creation operation is ongoing.

Can it be deleted

You can delete the PDF folder in the ViewerFiles folder.

You should not delete the indexes (the Indexes folder in the vault folder).

Should it be backed up

You do not have to back up the PDF folder in the ViewerFiles folder. You can do it, however, if you have sufficient storage space. 

You should back up the indexes (the Indexes folder in the vault folder).

Please review the M-Files Backup Policy for more information.

Can I stop the growth of the ViewerFiles folder

The 22.1 (January 2022) release carries an improvement for the end user experience - it generates a PDF preview by default for supported files as soon as they are checked in. This speeds up the preview process for the end users. However, it starts taking up space on the vault, especially if a large import happens.

You can disable the automatic preview generation upon check-in by going to Configurations > Advanced Vault Settings > Configuration > File Previews > Viewer Files and setting "Create Preview Files After Check-In" to "No" (it defaults to "Yes").

image.png

NOTE: preview files will still be generated there, and the folder size will naturally grow over time. If this setting is disabled, however, only files needed by an explicit operation will be generated there.

NOTE 2: If you disable the viewer files altogether, this will also disable search hit highlighting.

NOTE 3: The information about the ViewerFiles folder applies to the Thumbnails folder as well - those are thumbnails generated for images the user previewed in large icons mode and are not related to search hit highlighting.

Still need help?