File¶
Attach and reference files. Supports uploads and external links.
Syntax¶
Captions are supported by adding a [caption] line immediately below the block.
Examples¶
[file](./assets/specification.pdf)
[caption] Technical specification
[file](https://docs.example.com/api.pdf)
[caption] API Reference
Builder¶
from notionary.markdown import MarkdownBuilder
markdown = (MarkdownBuilder()
.h2("Resources")
.file("./assets/manual.pdf", "Installation guide")
.paragraph("Download and follow the steps.")
.build())
Notion API Reference
For the official Notion API reference on file blocks, see https://developers.notion.com/reference/block#file