Also, it supports setting a custom file name when adding a file block (external file only, since Notion API doesn't support uploading files).
var request = new BlockAppendChildrenRequest()
{
BlockId = "xxx",
After = "yyy",
Children = new List<IBlockObjectRequest>()
{
new FileBlockRequest()
{
File = new ExternalFile()
{
External = new ExternalFile.Info()
{
Url = "https://example.com/my-external-file.pdf"
},
Name = "my-custom-file-name.pdf"
}
}
}
};
await _notionClient.Blocks.AppendChildrenAsync(request);
Description
Adds support to read and write names for the file blocks.
Now, when you retrieve a file block (uploaded or external file), the name of the file is included in the response. For example:
Also, it supports setting a custom file name when adding a file block (external file only, since Notion API doesn't support uploading files).
Documentation reference: