Skip to content

fix: handle Notion attachment URL format in file upload#131

Open
yaniv-golan wants to merge 1 commit intovzhd1701:masterfrom
yaniv-golan:fix/attachment-url-format
Open

fix: handle Notion attachment URL format in file upload#131
yaniv-golan wants to merge 1 commit intovzhd1701:masterfrom
yaniv-golan:fix/attachment-url-format

Conversation

@yaniv-golan
Copy link
Copy Markdown

Summary

  • Notion now returns attachment:UUID:filename URLs instead of S3 URLs for uploaded files
  • _extract_file_id only handled the old AWS S3 URL format, causing all notes with file attachments to fail with ValueError: Uploaded file URL format changed
  • Added support for the new attachment: URL format while keeping backwards compatibility with S3 URLs

Test plan

  • New test test_upload_url_parser_attachment for the new URL format
  • Existing S3 URL test still passes
  • Existing failure test still passes
  • Manually verified with real ENEX import against Notion API

Notion now returns attachment:UUID:filename URLs instead of S3 URLs
for uploaded files. This caused all notes with file attachments to
fail with "Uploaded file URL format changed".
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