@refinio/one.models
    Preparing search index...

    This cache caches attachments stored as blob descriptors.

    This is necessary, because on rerender of chat messags we do not want to load attachments again. This would take too much time because we would have to load them and the browser would have to decode them again.

    Index

    Constructors

    Properties

    onError: OEvent<(error: any) => void> = ...
    onUpdate: OEvent<() => void> = ...

    Methods

    • Loads an attachment asynchronously and emits onUpdate event when it is done.

      For the moment nothing is monitored after the image is loaded. This API was intended for versioned objects, where the versioned object is monitored for new version.

      Parameters

      • hash: SHA256Hash

      Returns void

    • Get the attachment synchronously

      Parameters

      • hash: SHA256Hash

      Returns undefined | OneObjectTypes

      if undefined, either monitorAttachment has not finished loading the data or was never called