Table of Contents

Method StartSyncAsync

Namespace
PowerSync.Common.Attachments
Assembly
PowerSync.Common.dll

StartSyncAsync()

Starts the attachment synchronization process.

public Task StartSyncAsync()

Returns

Task

A task that completes when the sync loops have been started.

Remarks

This method:

  • Stops any existing sync operations.
  • Initializes local storage and verifies attachment integrity.
  • Sets up periodic synchronization based on SyncInterval.
  • Registers listeners for active attachment changes and database connection status.
  • Processes watched attachments to queue uploads/downloads.
  • Handles state transitions for archived and new attachments.

Cancels any in-flight pipeline before launching a new one; safe to call repeatedly.