Skip to content

Image support (external media URL or Covers) #57

Answered by lastorel
Pio-github asked this question in Q&A
Discussion options

You must be logged in to vote

There is no support for editing the page cover or the page "files" property at the moment.

Only "url" type is supported. And it works for gallery view, I can see the picture from external URL.

Create page example:

from pytion import Notion 
from pytion.models import PropertyValue, LinkTo

no = Notion(token="x")
pv = PropertyValue.create(type_="url", value="https://example.com/image.jpg")  # for editing one of properties of the page
parent = LinkTo.create(database_id="bc339ec71988466c95c083359e239a7c")  # enter database ID to create the page inside
page = no.pages.page_create(parent=parent, title="Some title", properties={"Picture": pv})  # "Picture" is the property name

Almost the same fo…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by lastorel
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #52 on February 18, 2023 20:41.