Reprocessing Previews - Orodan/Hilary GitHub Wiki

In OAE it is possible to trigger all or some content previews to be reprocessed by using a filter. This is sometimes required when upgrading versions if there are changes required to previews that are not backward compatible.

The Reprocess Previews functionality works by accepting a set of filters from the REST endpoint. To reprocess previews, perform the following steps:

  1. It's important to note that processing a single preview is a slow task. It can take anywhere from a few seconds to a few minutes for more complex files, such as very large PDF documents. You should perform a test ahead of time to get an idea of how many previews will be reprocessed given a particular filter, and temporarily increase the number of preview processors you have running accordingly, based on how much time you want to spend reprocessing previews.
  2. Log in to the administration UI as a global administrator
  3. Using your web browser development console (e.g., Chrome console or Firefox console), invoke a POST request to the /api/content/reprocessPreviews endpoint. A full set of available filters can be found in the code documentation and the OAE will provided recommended command in the upgrade guide

The following is an example reprocess previews execution that will reprocess all content revisions that have the specified mime types:

$.ajax({
    'type': 'POST',
    'url': '/api/content/reprocessPreviews',
    'data': {
        'revision_mime': [
            'application/msword',
            'application/rdf+xml',
            'application/vnd.ms-excel',
            'application/vnd.ms-powerpoint',
            'application/vnd.oasis.opendocument.presentation',
            'application/vnd.oasis.opendocument.spreadsheet',
            'application/vnd.oasis.opendocument.text',
            'application/vnd.openxmlformats-officedocument.presentationml.presentation',
            'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
            'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
            'application/x-mspowerpoint',
            'application/x-pdf',
            'application/x-powerpoint',
            'text/plain',
            'application/pdf'
        ]
    }
});