RemoteStorageAdapter
Experimental Alpha
RemoteStorageAdapter defines the interface for remote storage operations. Implementations handle uploading, downloading, and deleting files from remote storage.
This is currently experimental and may change without a major version bump.
Methods
deleteFile()
deleteFile(attachment): Promise<void>;
Alpha
Deletes a file from remote storage.
Parameters
| Parameter | Type | Description |
|---|---|---|
attachment | AttachmentRecord | The attachment describing the file to delete |
Returns
Promise<void>
downloadFile()
downloadFile(attachment): Promise<ArrayBuffer>;
Alpha
Downloads a file from remote storage.
Parameters
| Parameter | Type | Description |
|---|---|---|
attachment | AttachmentRecord | The attachment describing the file to download |
Returns
Promise<ArrayBuffer>
The binary data of the downloaded file
uploadFile()
uploadFile(fileData, attachment): Promise<void>;
Alpha
Uploads a file to remote storage.
Parameters
| Parameter | Type | Description |
|---|---|---|
fileData | ArrayBuffer | The binary content of the file to upload |
attachment | AttachmentRecord | The associated attachment metadata |
Returns
Promise<void>