You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add attachment replication support to Microsoft OneDrive plugin (#8592)
* feat(replication-microsoft-onedrive): implement attachment replication with base64 encoding
Mirrors the attachment replication support that was added to the
google-drive plugin: attachment binary data is serialised as base64
inside the document JSON file stored on OneDrive while `_attachments`
remains as clean stubs. Enabled automatically when the collection
schema declares `attachments: {}` and can be disabled via
`attachments: false`.
* refactor: share attachment serialization helpers between google-drive and onedrive plugins
Move serializeDocAttachments, deserializeDocAttachments and the
inline-stripForComparison logic (now stripAllAttachmentDataForComparison)
from each plugin's document-handling.ts / upstream.ts into
src/replication-protocol/helper.ts so both replication backends share
a single implementation. The plugins re-export the same names so the
public API is unchanged.
---------
Co-authored-by: Claude <noreply@anthropic.com>
- ADD `replication-microsoft-onedrive` plugin now supports attachment replication. Attachment binary data is stored as base64 in a separate `_attachments_data` field of the document JSON file on OneDrive, keeping `_attachments` as clean stubs. Attachment replication is enabled automatically when the collection schema has `attachments: {}` defined and can be disabled by passing `attachments: false` to `replicateMicrosoftOneDrive()`.
2
+
- REFACTOR move the attachment serialisation helpers (`serializeDocAttachments`, `deserializeDocAttachments`, `stripAllAttachmentDataForComparison`) to `src/replication-protocol/helper.ts` so they can be shared between the google-drive and microsoft-onedrive replication plugins.
0 commit comments