Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Current »

Generates a web page that shows a preview of a file. For example, it uses code mirror for text based formats, an iframe for Office or InDesign documents.

This is an asynchronous operation. When completed, the results contain a secure file token.

With the token you can easily build the URL to open the preview page in the browser.

Note: You should always use this call after a first call to resources/files/details

URL

(POST) /resources/files/preview

PARAMETERS

The parameters are a JSON object included in the request body:

scope

The scope object. Note that if you use a document set or global search scope, you will receive an "available" = false result. In fact these scopes do not support files.

Mandatory
   
 Document or attachment to preview 
didThe document id. This must be a document within the scope.Mandatory
sdidThe sub document id. If you can supply it do so. A Beebox LivePreview requires this parameter.Optional
locale

Language of the file.

Mandatory
folderFolder ID of the file. If not specified the call refers to source/target document. Must be used to reference attachments.Optional
name

Name the file. If not specified the call refers to source/target document. Must be used to reference attachments.

Optional
   
 Preview options 
domainThe parser domain. If not specified, the domain is estimated. You should provide this parameter if you got this value from resources/files/detailsOptional
baseurlOptional base URL if the previewed file is a web page (used to offset relative image paths, css etc.)Optional
encoding

Optional encoding of file to preview. Use if you want to explicitly override the encoding currently saved with the file.

Optional

 

RESULTS

A TRM formatted JSON.

When finished the JSON contains a secure token that you can use to view the file: previewtoken

Then open a browser page and direct to /api/media/get/{previewtoken}/stream to show the results which is an HTML page.

 

  • No labels