Smaller files can be stored as base64-encoded data, but syncing many larger files using database rows may cause performance degradation.

On the other hand, PowerSync works well for syncing the attachment metadata, which could include the file path, name, size, and type. The client may then download the file from the storage provider, such as Supabase Storage or AWS S3.

Helper Packages

We currently have these helper packages available to manage attachments:

SDKAttachments Helper PackageExample Implementation
React Native / JavaScriptpowersync-attachmentsTo-Do List demo app
Flutterpowersync_attachments_helperTo-Do List demo app

The example implementations above use Supabase Storage as storage provider.

  • For more information on the use of Supabase as the storage provider, refer to Handling Attachments
  • To learn how to adapt the implementations to use AWS S3 as the storage provider, see this tutorial

Note: Attachment helper packages for Kotlin and Swift are planned. Let us know if you require this for your project.