Attachments Interface
The attachments of one client. The paths it returns name files under the client's attachments directory; in the browser they name OPFS entries.
The SDK stores and transfers the file an app gives it. It makes no preview or thumbnail: an app that shows an image makes its own from the local file. The SDK retries no failed upload or download. A thrown XmtpError.Attachment says in its retryable detail whether the same call can succeed later. A Failed status has no such detail: its failure decides it by the ATCH cause table, from cause, from httpStatus for the HttpStatus cause, and from retryable for the Credential cause.
Inheritors
Functions
Stage a new attachment and return it before any request. Send its remote attachment, then upload it.
Delete the attachment's local files and records.
Download, verify, and decrypt the attachment into the attachments directory, or return the file a completed download left there. A failed download is not retried.
The plaintext attachment files this client keeps.
Every pending attachment that has not completed its upload.
The path of the attachment's plaintext file. The file exists only after a download or a create on this client.
The pending attachment for this remote attachment.