Skip to main content

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 ParameterDefault type
TLocal extends LocalStorageAdapterLocalStorageAdapter

Properties

PropertyTypeDescription
archivedCacheLimit?numberAlpha Maximum archived attachments before cleanup. Default: 100
dbCommonPowerSyncDatabaseAlpha PowerSync database instance
downloadAttachments?booleanAlpha Whether to automatically download remote attachments. Default: true
errorHandler?AttachmentErrorHandlerAlpha Handler for upload, download and delete errors
localStorageTLocalAlpha Local storage adapter for file persistence. Its type determines whether AttachmentQueue.saveFileFromUri is available (a StreamingLocalStorageAdapter enables it).
logger?PowerSyncLoggerAlpha Logger instance. Defaults to db.logger
syncIntervalMs?numberAlpha Periodic polling interval in milliseconds for retrying failed uploads/downloads. Default: 30000
syncThrottleDuration?numberAlpha Throttle duration in milliseconds for the reactive watch query that detects attachment changes. Prevents rapid-fire syncs during bulk changes. Default: 30
tableName?stringAlpha Name of the table to store attachment records. Default: 'ps_attachment_queue'
watchAttachments(onUpdate, signal) => voidAlpha Callback for monitoring attachment changes in your data model