NotionX / NotionX/react-notion-x
Image URL from file properties are forbidden to access
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
Is this a known issue?
I'm not ready to publicly share the Notion page yet but the repro is simple:
- in a table, add a property of type
fileand upload an image. - fetch that property and get the
https://s3-us-west-2.amazonaws.com/secure.notion-static.com/url within it. - open the url in browser (or in
<img src>) and it will be 403 forbidden.
It seems like the official API is returning the same url except that the url is appended with a bunch of URL param e.g. X-Amz-Credential=... so it returns 200.
I also realized that in-page uploaded image works just fine but the URL encoding is a bit different, it started as https://www.notion.so/image/ and then the AWS url is appended as URL param encoded.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the table file-property case described in the issue and compare its returned URL with the in-page uploaded-image URL. Trace where the signed query parameters are lost; done means the resulting image URL loads successfully instead of returning 403.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100