notion-py
notion-py copied to clipboard
Upload a file in a "file" type column in a table.
I enjoy the great features of this package.
To upload a file, I can use the FileBlock class and the upload_file method. When the FileBlock is a child of a page, the uploaded file is shown as a block on a page. I can attach a FileBlock as a child of a row of a table, and then the uploaded file is shown as an icon on the title column.
When a column is set as a "file" type, I can upload a file to the column from web. But, can I do this from this API?
I uploaded a file directly following the code of the upload_file method, and I added the url to the file-type column. I found that the link appeared but did not work; a ValidationError returned as a json file with a message "User does not have access."
Hi Asuka, do you have solved this problem? I want to add files to a column as well. Thank you
when i set the file property to the FileBlock.source, i get the following when trying to view the file in a web browser
{"errorId":<errorId>,"name":"ValidationError","message":"User does not have access."}
this solution worked for me: https://github.com/jamalex/notion-py/issues/75