oo

Configuring Limits for File Previews

Liferay DXP 2024.Q1 U112

Users can preview certain documents (e.g. PDF or text files) in the Documents and Media application; however, previews can take a large amount of storage, if you have many or large documents. In some cases, you might want to limit the number of pages a user can preview. You can save a significant amount of storage by applying a limit to the number of previewed pages.

Note

When you change the file preview limit, it affects only new files.

To configure the file preview and limit the number of previewed pages,

  1. Open the Global Menu (Global Menu) and select the Control Panel tab.

  2. Select System Settings or Instance Settings.

    You can apply global rules at the system level and apply more restrictive configurations at an instance level.

    For example, you can limit the maximum number of previewed pages to 10 at the system level, but you can set a value of 10 or fewer pages at an instance level.

  3. Click Documents and Media under Content and Data.

Configure the file preview limits through system or instance settings.

  1. On the left menu, select File Preview Limits (1).

  2. Set the maximum file size for generating previews. No preview is generated for files larger than the specified value.

    The size value is in bytes, and the default maximum size is 20 megabytes.

    Use -1 to enable previews to all files.

    Use 0 to disable previews to all files.

  3. Set the number of pages shown in your preview.

    Use 0 to show all pages.

When file preview limits are set, a message appears during document preview indicating that the preview may not show all pages.

While previewing a file, users will see a message indicating that the preview may not show all pages.