Changing the Default Preview Settings
The default preview settings are configured in the Rest Service "web.config" file. A Locator administrator can modify these settings by editing the web_config_override.xml file found in "\Program Files\VirtualWorks\ViaWorks\RestService\Custom" or (for version 2.9 or newer) "\Program Files\ayfie\Locator\RestService\Custom".
Example: To change the maximum file size supported for previews, add the following to the "web_config_override.xml" file and then run "web_config_override.bat":
<replace type="@value" sel="/configuration/appSettings/add[@key='PreviewMaxFileSize']">99999999</replace>
</diff>
To run the "web_config_override.bat" file:
- Open a Command Prompt (Run as Administrator). An elevated command prompt must be used to allow changes to be made in the “Program Files” folder.
- Navigate to the "{Install Folder}\RestService\Custom" folder.
- Run the command: web_config_override
- This will modify "web.config" which will cause the application to restart.
Using the web_config_override file instead of the web.config file ensures configuration changes are retained after upgrading.
The default settings found under AppSettings are as follows:
PreviewsEnabled: Enables or disables document previews. Default = true
PreviewCacheSize: Amount of disk space to use for the preview cache. Default = 10737418240 (10GB)
PreviewMaxPages: Maximum number of pages per document to display in the preview. Default = 99
PreviewMaxFileSize: Maximum file size to generate a preview. Default = 10485760 (10.4MB)
PreviewLevel1cacheDirLength: Controls cache directory hierarchy. Do not change. Default = 4
PreviewLevel2CacheDirLength: Controls cache directory hierarchy. Do not change. Default = 4
PreviewSkipExtensions: Extensions specifically excluded from previews. Default = jar;zip;war
PreviewCacheCleanupPeriodInMin: Number of minutes between preview cache clean up. Default = 20
PreviewMaxPixelWidth: Maximum pixel width of generated preview image. Default = 816
Caution: Also in the Rest Service web.config file are the PreviewApp format support settings. File Types listed in this section have been tested and approved by ayfie. Modifying this section can cause unexpected behavior with document previews.
ayfie