react-notion-x icon indicating copy to clipboard operation
react-notion-x copied to clipboard

feat(add support for private Notion page assets)

Open jmuchovej opened this issue 3 years ago • 3 comments
trafficstars

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. 😅

jmuchovej avatar May 01 '22 19:05 jmuchovej

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)

vercel[bot] avatar May 01 '22 19:05 vercel[bot]

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

jmuchovej avatar May 11 '22 02:05 jmuchovej

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

jmuchovej avatar Jun 02 '22 18:06 jmuchovej