Skip to content

Commit ae910b0

Browse files
committed
Add benefits and better link
1 parent 98d73e2 commit ae910b0

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

packages/powersync_attachments_helper/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
>
1111
> The `powersync_core/attachments` library is in alpha and brings improved APIs and functionality that is more in line with our other SDKs, such as the ability to write your own local storage implementation.
1212
>
13-
> Check out the [docs here](/packages/powersync_core/doc/attachments.md) to get started.
13+
> Check out the [docs here](https://pub.dev/documentation/powersync_core/latest/topics/attachments-topic.html) to get started.
1414
>
1515
> While the `powersync_attachments_helper` package will still get bug fixes if you need them,
1616
> new features will only be developed on `powersync_core/attachments`.

packages/powersync_core/doc/attachments.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,26 @@ PowerSync.
55
Embedding this data directly in your source databases is [inefficient and not recommended](https://docs.powersync.com/usage/use-case-examples/attachments).
66

77
Instead, the PowerSync SDK for Dart and Flutter provides utilities you can use to _reference_ this binary data
8-
in your local database, and then download it from a secondary data store such as Supabase Storage or S3.
8+
in your regular database schema, and then download it from a secondary data store such as Supabase Storage or S3.
99
Because binary data is not directly stored in the source database in this model, we call these files _attachments_.
1010

11+
12+
> [!NOTE]
13+
> These attachment utilities are recommended over our legacy [PowerSync Attachments Helper](https://pub.dev/packages/powersync_attachments_helper) package. The new utilities provide cleaner APIs that are more aligned with similar helpers in our other SDKs, and include improved features such as:
14+
> - Support for writing your own local storage implementation
15+
> - Support for dynamic nested directories and custom per-attachment file extensions out of the box
16+
> - Ability to add optional `metaData` to attachments
17+
> - No longer depends on `dart:io`
18+
>
19+
> If you are new to handling attachments, we recommend starting with these utilities. If you currently use the legacy `powersync_attachments_helper` package, a fairly simple migration would be to adopt the new utilities with a different table name and drop the legacy package. This means existing attachments are lost, but they should be downloaded again.
20+
1121
## Alpha release
1222

13-
The attachment helpers described in this document are currently in an alpha state, intended for testing.
23+
The attachment utilities described in this document are currently in an alpha state, intended for testing.
1424
Expect breaking changes and instability as development continues.
1525
The attachments API is marked as `@experimental` for this reason.
1626

17-
Do not rely on these libraries for production use.
27+
Do not rely on these utilities for production use.
1828

1929
## Usage
2030

0 commit comments

Comments
 (0)