Binary

The Binary class represents the data stored in a binary attribute of a CMS object or widget.

Static method summary

Instance method summary

  • 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.

  • 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)

    Optimizes an image based on the specified dimensions.

  • 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.

FutureBinary

The FutureBinary class represents the data to be stored in a binary attribute. See Binary.upload and Binary#copy for details.

Instance method summary

  • into(target)

    This performs the actual upload or copy operation and stores the FutureBinary instance in the specified Obj.