isBinary()

Indicates whether the Obj represents binary data.

Copy
obj = Scrivito.getClass("Image").all().first();
if (obj.isBinary()) {
  console.log(obj.get('blob').url());
}

Binaries are handled differently in that they are not rendered using the normal layout but sent as a file. Examples of binary resources are Images or PDFs.

Every Obj that has a blob attribute of the binary type is considered a Binary.

Type

Boolean - true if this Obj represents a binary resource.