tridion-sites-extensions-api-docs

Home > @tridion-sites/models > BinaryContent

BinaryContent class

Represents the binary content of a Multimedia Component or a Template.

Signature:

export declare class BinaryContent

Constructors

Constructor Modifiers Description
(constructor)({ backendModel, multimediaType })   Constructs a new instance of the BinaryContent class

Properties

Property Modifiers Type Description
_backendModel   BackendBinaryContent  
blobId   string | undefined ID of the binary in the permanent content storage.
externalBinaryUri   string | undefined <p>URI for the external binary content.</p><p>This property should only be set if “isExternal” is true.</p>
filename   string | undefined <p>File name of the binary content.</p><p>If the binary content is stored externally, the value reflects the logical file name of the binary data (determined by the CM system).</p><p>If the binary content is stored internally, the value should be set to the original file name (not the full path).</p><p>For backward compatibility purposes, it is allowed to set this property to the external binary URI. This will effectively set the “externalBinaryUri” property instead.</p>
getInternalModel   () => BackendBinaryContent  
isExternal   boolean <p>Whether the binary content is stored internally or externally.</p><p>If the binary content is stored externally, the “filename” property should contain the URL where the binary content can be retrieved.</p>
mimeType   string | undefined MimeType of the binary content.
multimediaType   Link | undefined <p>Multimedia Type of the binary content.</p><p>This only applies to the binary content of Multimedia Components; for templates with binary content, this property is always undefined.</p>
size   number | undefined Size of the binary data.
uploadFromFile   string | undefined <p>Uploaded filename of the binary content.</p><p>If the binary content is stored externally, it should not have value. If the binary content is stored internally, it should contain filepath.</p>
url   string | undefined Url that can be used to navigate and get a binary.