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

Fix private file signed url generation #596

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

worgho2
Copy link

@worgho2 worgho2 commented Dec 14, 2024

Description

When trying to display a PDF file, I've figured out that notion is using a new bucket url to serve their files and it impacts how this library handles url signing.

  • Old files start with: https://s3-us-west-2.amazonaws.com/secure.notion-static.com/...
  • New files start with: https://prod-files-secure.s3.us-west-2.amazonaws.com/...

Including prod-files-secure prefix when identifying a private url, fixed the issue.

Other than that, the PDF component is using an outdated pdfjs-dist cdn url, so i've updated it.

Notion Test Page ID

  • PDFs not being displayed: 34d650c65da34f888335dbd3ddd141dc

Copy link

vercel bot commented Dec 14, 2024

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

Name Status Preview Updated (UTC)
react-notion-x ✅ Ready (Inspect) Visit Preview Dec 14, 2024 5:03am
react-notion-x-minimal-demo ✅ Ready (Inspect) Visit Preview Dec 14, 2024 5:03am

@scriptify
Copy link

Good stuff, thanks

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.

2 participants