Skip to content

feat(files): attach_to on upload_file - #48

Draft
gauravmm wants to merge 1 commit into
awkoy:mainfrom
gauravmm:feat/upload-attach-to
Draft

feat(files): attach_to on upload_file#48
gauravmm wants to merge 1 commit into
awkoy:mainfrom
gauravmm:feat/upload-attach-to

Conversation

@gauravmm

Copy link
Copy Markdown
Contributor

upload_file returned a file_upload_id and nothing in the server said what to do with it. Placing the file took a second call with raw children JSON whose shape appears in no schema or example.

attach_to: { block_id, caption?, position? } appends the block in the same call. The block type follows the content type: image, video, audio, pdf, else file.

Adds tests that fail without the fix. Suite stays green.

Note for a reviewer: attach_to.block_id is a bare string here, because this branch was cut before feat/accept-notion-urls-as-ids. If both land, block_id needs notionId() in the same pass.

upload_file returned a file_upload_id and nothing in the server said what
to do with it. Placing the file took a second call with raw children JSON
whose shape appears in no schema or example.

attach_to: { block_id, caption?, position? } appends the block in the same
call. The block type follows the content type: image, video, audio, pdf,
else file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YM3ZVWH22UzzTTbbkoJw9P
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant