BaseAttachmentQueueOptions<TLocal>
Experimental Alpha
Fields common to every AttachmentQueueOptions variant.
This is currently experimental and may change without a major version bump.
Type Parameters
| Type Parameter | Default type |
|---|---|
TLocal extends LocalStorageAdapter | LocalStorageAdapter |
Properties
| Property | Type | Description |
|---|---|---|
archivedCacheLimit? | number | Alpha Maximum archived attachments before cleanup. Default: 100 |
db | CommonPowerSyncDatabase | Alpha PowerSync database instance |
downloadAttachments? | boolean | Alpha Whether to automatically download remote attachments. Default: true |
errorHandler? | AttachmentErrorHandler | Alpha Handler for upload, download and delete errors |
localStorage | TLocal | Alpha Local storage adapter for file persistence. Its type determines whether AttachmentQueue.saveFileFromUri is available (a StreamingLocalStorageAdapter enables it). |
logger? | PowerSyncLogger | Alpha Logger instance. Defaults to db.logger |
syncIntervalMs? | number | Alpha Periodic polling interval in milliseconds for retrying failed uploads/downloads. Default: 30000 |
syncThrottleDuration? | number | Alpha Throttle duration in milliseconds for the reactive watch query that detects attachment changes. Prevents rapid-fire syncs during bulk changes. Default: 30 |
tableName? | string | Alpha Name of the table to store attachment records. Default: 'ps_attachment_queue' |
watchAttachments | (onUpdate, signal) => void | Alpha Callback for monitoring attachment changes in your data model |