Readonly
attachmentReturns 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.
If this attachment fetcher has been initiated through Collection.fetchAttachment()
, the promise
resolves to null
if the attachment could not be found instead of being
rejected.
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.
These objects are returned by calls to ditto.store.fetchAttachment() and allow you to stop an in-flight attachment fetch.