[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(add support for private Notion page assets) #282

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmuchovej
Copy link
@jmuchovej jmuchovej commented May 1, 2022

Description

Traverses a page's blocks (for collection_view support) to generate Signed URLs for images. Also expands defaultMapImageUrl to support lookups for UGC (user-generated content) on Page Covers and Page Icons. (Which will follow a form similar to https://notion.so/<UUID>/<filename>.<ext>. Since the OG implementation maps these assets to block.id, which refers to the Page, only one of Cover / Icon were allowed to be UGC.)

Notion Test Page ID

I used the shipped examples in examples/full, so 067dd719a912471ea9a3ac10710e7fdf.

This is intended to work on private pages and didn't appear to alter public pages.

Note: It seems that image loading is slower from AWS now. But, I believe this is due to one of the GIFs on my test page being ~30MB. 😅

Traverses a page's blocks (for `collection_view` support) to generate
Signed URLs for images. Also expands `defaultMapImageUrl` to support
lookups for UGC (user-generated content) on Page Covers and Page Icons.
(Which will follow a form similar to
 `https://notion.so/<UUID>/<filename>.<ext>`. Since the OG
 implementation maps these assets to `block.id`, which refers to the
 Page, only one of Cover / Icon were allowed to be UGC.)
@vercel
Copy link
vercel bot commented May 1, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
react-notion-x ✅ Ready (Inspect) Visit Preview May 1, 2022 at 7:10PM (UTC)
react-notion-x-minimal-demo ✅ Ready (Inspect) Visit Preview May 1, 2022 at 7:10PM (UTC)

@jmuchovej
Copy link
Author

@transitive-bullshit Since you refactored the map-*-url into their own files – should I do so here, too?

@jmuchovej
Copy link
Author

@transitive-bullshit A friendly ping about this. 🙂 Anything I can do to speed things along?

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.

None yet

1 participant