Closed mediamods closed 9 months ago
await nClient.pages.update({
page_id: pageId,
properties: {
"uploady": {
"files":
[
{
"type": "external",
"name": "Space Wallpaper",
"external": {
"url": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"
}
}
]
}
}
});
Describe the bug
I have a table with a column for
Files & media
.Using the js api, I try to add to it like this:
await nClient.pages.update({ page_id: pageId, properties: { "uploady": { "files": [ { "external": { "url": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png" } } ] } }
I believe this should work. Instead, I get this error:
update error APIResponseError: body failed validation. Fix one: body.properties.uploady.files[0].file should be defined, instead was
undefined. body.properties.uploady.files[0].name should be defined, instead was
undefined.
To Reproduce Node version: 2.16.2 Notion JS library version: 2.2.13