Custom Previews

Advanced-UI NOVA-UI

The Custom Previews plugin adds a special preview functionality to the asset context menu for its supported file extensions. The goal is to provide a better user experience for the file extensions where the standard JPG image shown by Celum is not suitable or not the desired behavior.

The label for the key of the menu item is customPreviews.menuTitle and can be customized via the {home}/appserver/lang/customMessages_xx.properties files.

Properties

To be configured in {home}/appserver/conf/custom.properties.

customPreviews.license

type: String, required: yes, default: -, since v1.0.1

The license key for the plugin (product: customPreviews), provided by brix.

customPreviews.allowedUserGroups

type: List of Long, required: no, default: - (visible for everybody)

If one or more user group ids are specified, then the plugin's menu entry is only visible for those user groups and super admins.

customPreviews.screenshotEnabled

type: boolean, required: no, default: true, since: 1.2.0

Whether the screenshot tool (currently available for 3D) that creates a custom thumbnail should be enabled. Requires customPreviewSetter to be installed (it gets uploaded to that controller).

customPreviews.previewers

type: List of String, required: no, default: - (all previewers are available)

A list of the previewer beans for which the custom preview will be enabled.

Currently available: customPreviewsImagePreviewer, customPreviewsPdfPreviewer, customPreviewsOfficePreviewer, customPreviewsModelPreviewer.

customPreviews.imagePreviewer.extensions

type: List of String, required: no, default: gif

File extensions for which the image previewer is used. The specified extensions have to be a valid src for an img tag.

customPreviews.pdfPreviewer.extensions

type: List of String, required: no, default: pdf

File extensions for which the pdf previewer is used.

customPreviews.officePreviewer.extensions

type: List of String, required: no, default: doc,docx,xls,xlsx,ppt,pptx

File extensions for which the office previewer is used.

customPreviews.modelPreviewer.extensions

type: List of String, required: no, default: glb,gltf

File extensions for which the model previewer is used.

customPreviews.modelPreviewer.settings

type: String, required: no, default: camera-controls auto-rotate autoplay shadow-intensity="1" ar

The settings for the model previewer (model-viewer documentation).

customPreviews.origImageDetailsPreviewer.extensions

type: List of String, required: no, default: jpeg,jpg,png,apng,svg,bmp,ico

File extensions for which the details previewer is used.

customPreviews.overrideDownloadFormat=

type: List of mappings <download format>:<comma-separated list of file extensions>, required: no, default: -

Override the download format for specific file extensions. This can be used for the origImageDetailsPreviewer to be able to show images which aren't supported by the browser.

The previews can be used too: thumb, prvw, largeprvw.

customPreviews.replaceLocalhost

type: string, required: no, default: -, version: 1.5.3

Currently, we could only download files from the app server via download link if we extract the storage url and then replace 127.0.0.1 or localhost by host.docker.internal. So in a local docker environment without real public URL you can set this property to host.docker.internal.

Previewers

ImagePreviewer

id: customPreviewsImagePreviewer, extensions: customPreviews.imagePreviewer.extensions

Shows the original file using an img tag.

PdfPreviewer

id: customPreviewsPdfPreviewer, extensions: customPreviews.pdfPreviewer.extensions

Shows the PDF file using an iframe, so the browser's PDF viewer will display it.

OfficePreviewer

id: customPreviewsOfficePreviewer, extensions: customPreviews.officePreviewer.extensions

Shows Microsoft Office documents via their free service view.officeapps.live.com. There is no need to install Microsoft Office but the previewed file will be uploaded to the external site.

ModelPreviewer

id: customPreviewsModelPreviewer, extensions: customPreviews.modelPreviewer.extensions

This has been superseded by the build-in model viewer (if your plan covers that feature, that is)

Shows 3D models using Google's model-viewer.

As of 6.16.0, you need to REMOVE the supported file formats from conversion.fileproperties.3dExtensions, because this setting prevents any kind of preview from being converted, even if it's actually an image/png (apparently the extension of the asset is checked, and not of the alternativePreview that is sent). At the time of writing this results in conversion.fileproperties.3dExtensions=obj,blend,fbx,3dc,3ds,abc,dae,zae,igs,iges,las,ply,stl

DetailsPreviewer

id: customPreviewsOrigImageDetailsPreviewer, extensions: customPreviews.origImageDetailsPreviewer.extensions

Supports intuitive move and zoom operations on the original image to view every detail. Input is possible via mouse (wheel also) and keyboard. Unlike most such viewers the fix point is where the user clicked, so that we can zoom in on a detail by some clicks without having to move the mouse.

Labels

To be configured in {home}/appserver/lang/customMessages_{language}.properties.

customPreviews.previewers

The label for the context menu item and the title of the preview window.

Screenshots

Example of the model-previewer (using Astronaut.glb)

model-viewer

Resulting thumbnail on the asset using the screenshot tool:

thumbnail

Compatibility Matrix

Custom Previews CELUM (min. version)
1.0 5.13.3
1.0.3 5.13.4 (tested up to 6.4)
1.0.5 5.13.4+ (tested up to 6.8)
1.1.0 5.13.4+ (tested up to 6.8)
1.2.0 5.13.4+ (tested up to 6.8)
1.4.0 5.13.4+ (tested up to 6.8)
1.5.0 5.13.4+ (tested up to 6.8)
1.6.0 5.13.4+ (tested up to 6.16)
Nova Plugin CELUM (min. version)
1.0.0 6.8.1
1.0.1 6.9.0
1.0.2 6.11.0 - 6.16.0

Release Notes

1.0.0

Released 2019-01-15

Initial Version

1.0.1

Released 2019-01-28

Added license

1.0.5

Released 2021-01-08

Fixed office previewer, URL changed

1.1.0

Released 2021-03-15

  • Added new previewer for 3D models
  • All previewers have their file extensions in properties now
1.2.0

Released 2021-03-31

  • Added ability to take a screenshot of a 3D model and set is as the thumbnail
1.3.0

Released 2021-09-30

  • Added details previewer
1.4.0

Released 2021-10-13

  • Nova plugin support
1.5.0

Released 2021-10-29

  • Several assets can be opened at once
1.6.0

Released 2023-11-19

  • Internalized <model-viewer> to work around CSP issue