Ditto JS SDK v5.0.0
    Preparing search index...

    Class AttachmentFetcher

    These objects are returned by calls to ditto.store.fetchAttachment() and allow you to stop an in-flight attachment fetch.

    Implements

    Index

    Properties

    Methods

    Properties

    attachment: Promise<Attachment>

    Returns a promise for the attachment that you can await.

    The promise is rejected if an error occurs during the fetch. Note that the AttachmentFetcher itself implements PromiseLike, so you can await it directly.

    Methods

    • Stops fetching the associated attachment and cleans up any associated resources.

      Note that you are not required to call stop() once your attachment fetch operation has finished. The method primarily exists to allow you to cancel an attachment fetch request while it is ongoing if you no longer wish for the attachment to be made available locally to the device.

      Returns void