Skip to content

fix: avoid getPublicPageData for spaceId during file upload#132

Open
yaniv-golan wants to merge 1 commit intovzhd1701:masterfrom
yaniv-golan:fix/space-id-lookup
Open

fix: avoid getPublicPageData for spaceId during file upload#132
yaniv-golan wants to merge 1 commit intovzhd1701:masterfrom
yaniv-golan:fix/space-id-lookup

Conversation

@yaniv-golan
Copy link
Copy Markdown

Summary

  • _upload_file calls new_block.space_info["spaceId"] to get the space ID for file uploads
  • space_info uses the getPublicPageData API endpoint, which returns 500 for private pages
  • This causes all file/image uploads to fail with HTTPError: 500 Server Error
  • Fix: use client.current_space.id instead, which is already available from initial authentication

Test plan

  • Existing tests pass
  • Manually verified file uploads work with real ENEX import against Notion API

The getPublicPageData endpoint returns 500 for private pages, causing
all file uploads to fail. Use client.current_space.id instead, which
is already available from the initial auth.
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