Cumulocity Web SDK - v1021.62.8
    Preparing search index...

    Class InventoryBinaryService

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Uploads a file and creates a managed object with its metadata. What's more, it invokes an upload progress callback.

      Parameters

      • file: Stream | Blob | Buffer | File

        A file to be uploaded.

      • onProgress: EventListener

        Event handler for progress update, invoked while the browser is uploading the file.

      • managedObject: Partial<IManagedObject> = {}

        An object containing metadata about the file.

      Returns XMLHttpRequest

    • Gets binary managed object's id from its download or self URL.

      Parameters

      • url: string

        URL string.

      Returns string

      Binary managed object's id.

      Example


      const id = InventoryBinaryService.getIdFromUrl('http://mytenant.cumulocity.com/inventory/binaries/12345');