Skip to content

Commit 17e4c5f

Browse files
update readme
1 parent c628ecf commit 17e4c5f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/PowerSync/attachments/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ let schema = Schema(
4747
)
4848
```
4949

50-
2. Create an `AttachmentQueue` instance. This class provides default syncing utilities and implements a default sync strategy. It can be subclassed for custom functionality:
50+
2. Create an `AttachmentQueue` instance. This class provides default syncing utilities and implements a default sync strategy.
5151

5252
```swift
5353
func getAttachmentsDirectoryPath() throws -> String {
@@ -78,6 +78,9 @@ let queue = AttachmentQueue(
7878
) }
7979
)
8080
```
81+
82+
Note: `AttachmentQueue` is an Actor which implements `AttachmentQueueProtocol`. The `AttachmentQueueProtocol` can be subclassed for custom queue functionality if required.
83+
8184
- The `attachmentsDirectory` specifies where local attachment files should be stored. `FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first?.appendingPathComponent("attachments")` is a good choice.
8285
- The `remoteStorage` is responsible for connecting to the attachments backend. See the `RemoteStorageAdapter` protocol definition.
8386
- `watchAttachments` is closure which generates a publisher of `WatchedAttachmentItem`. These items represent the attachments that should be present in the application.

0 commit comments

Comments
 (0)