New in 1.18.0

createFromFile(file, attributes)

Creates a binary Obj by uploading a file. The created obj is assigned to the site context.

The class must include a binary attribute named blob.


  • file (File) – the File instance to be uploaded.
  • attributes (Object) – Optional custom attributes and their values of the new CMS object.


  • ArgumentError – If the class has no binary attribute named blob, file is not an instance of File, or attributes includes a blob attribute.


A Promise resolving to the created Obj.

See also