The Binary class represents the data stored in a binary attribute of a CMS object or widget.
Binary
Binary.upload(source, options)
Prepares binary data locally for uploading to Scrivito.
contentLength()
Returns the length of the binary data, in bytes.
contentType()
Returns the content type of the binary data, e.g. "image/jpeg".
copy(options)
Prepares the Binary instance for copying. Returns a FutureBinary.
FutureBinary
filename()
The file name of this binary data.
isPrivate()
Checks whether the binary should not be publicly accessible.
metadata()
Returns the metadata of the given binary.
optimizeFor(definition)
Selects a version of an image based on the provided definition.
original()
The original version of a binary.
raw()
The raw version of a binary.
url()
The URL for accessing the binary data and downloading it using an HTTP GET request.