Skip to content

Commit 98d73e2

Browse files
authored
Merge pull request #334 from powersync-ja/attachments-polish
Improve discoverability, wording polish and fix inaccuracies
2 parents c0423b1 + a355528 commit 98d73e2

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

packages/powersync_attachments_helper/README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# PowerSync Attachments Helper for Dart/Flutter
22

3-
[PowerSync Attachments Helper](https://pub.dev/packages/powersync_attachments_helper) is a package that assist in keeping files in sync with local and remote storage.
3+
[PowerSync Attachments Helper](https://pub.dev/packages/powersync_attachments_helper) is a package that assists in keeping files in sync between local and remote storage.
44

55
> [!WARNING]
6-
> There is a new attachments helper library in the core PowerSync package, available under
7-
> `package:powersync_core/attachments/attachments.dart`. While this package will continue to receive
8-
> bugfixes, new feature development will only happen in the other package.
6+
> This package will eventually be replaced by a new attachments helper library in the core PowerSync package, available through:
7+
> ```dart
8+
> package:powersync_core/attachments/attachments.dart
9+
> ```
10+
>
11+
> 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.
12+
>
13+
> Check out the [docs here](/packages/powersync_core/doc/attachments.md) to get started.
14+
>
15+
> While the `powersync_attachments_helper` package will still get bug fixes if you need them,
16+
> new features will only be developed on `powersync_core/attachments`.
917
1018
1119
## Features
@@ -89,5 +97,3 @@ initializeAttachmentQueue(PowerSyncDatabase db) async {
8997
await attachmentQueue.init();
9098
}
9199
```
92-
93-
See our [Supabase Flutter To-Do List example app](../../demos/supabase-todolist/README.md) for a concrete implementation of the above.

packages/powersync_core/doc/attachments.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ 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 primary data model, and then download it from a secondary data store such as S3.
8+
in your local database, 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

1111
## Alpha release
@@ -31,8 +31,7 @@ The attachments' state is stored in a local-only attachments table.
3131

3232
### Example implementation
3333

34-
See the [supabase todolist](https://github.com/powersync-ja/powersync.dart/tree/main/demos/supabase-todolist) demo for
35-
a basic example of attachment syncing.
34+
See the [supabase-todolist](https://github.com/powersync-ja/powersync.dart/tree/main/demos/supabase-todolist) demo for a basic example of attachment syncing.
3635

3736
### Setup
3837

@@ -77,7 +76,6 @@ final attachmentQueue = AttachmentQueue(
7776
```
7877

7978
Here,
80-
8179
- An instance of `LocalStorageAdapter`, such as the `IOLocalStorage` provided by the SDK, is responsible for storing
8280
attachment contents locally.
8381
- An instance of `RemoteStorageAdapter` is responsible for downloading and uploading attachment contents to the secondary

0 commit comments

Comments
 (0)