Examples of syncing attachments between a client app and Supabase Storage.
supabaseBucket
key:
AttachmentRecord
to store the metadata of attachments.AttachmentState
to track the sync state of an AttachmentRecord
.AbstractAttachmentQueue
class to manage and sync AttachmentRecord
s:
AttachmentRecord
s.expo-camera
to allow users to capture a photo.photo_id
was added as a column to the todos
table to link a photo to a to-do item.attachments
table is instantiated to store the metadata of photos.
AbstractAttachmentQueue
abstract class and:
attachmentIds()
)AttachmentRecord
s to store photo metadata. (see newAttachmentRecord()
)savePhoto()
method to save photos into local storage and add them to the sync queue.attachments
table and related schema.