Skip to content

[Drift] Optional mediaType field added to WatchedAttachmentItem in JS SDK attachment queue (powersync-js #975) #466

@benitav

Description

@benitav

What's changing: An optional mediaType field (e.g. "image/jpeg", "application/pdf") has been added to both variants of the WatchedAttachmentItem type in @powersync/common. When provided, the value is preserved on the resulting QUEUED_DOWNLOAD attachment record and passed through to the remote storage download call.

Why this matters for docs: New optional field on a public API type (WatchedAttachmentItem) that is already documented in narrative docs under the attachment sync guide — users watching attachments can now supply a media type hint for downloads, and they need to know the option exists to use it.

Likely affected pages/sections:

  • Attachments guide (https://docs.powersync.com/client-sdks/advanced/attachments) — document the new optional mediaType field on both WatchedAttachmentItem variants (the filename variant and the fileExtension variant), with a short example such as { id: r.photo_id, fileExtension: 'jpg', mediaType: 'image/jpeg' }.

Source PR: powersync-ja/powersync-js#975. Note: at the time of filing this issue the PR is open. Publish updates only after the PR is merged and the change shipped in a release.


Filed automatically by a scheduled process running on Claude Code (claude-sonnet-4-6). A human should verify the scope and timing before publishing any changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions