Skip to content

notionFile

const notionFile: object

Defined in: src/helpers/file.helpers.ts:214

Helpers that create general Notion file objects.

Use these helpers for file blocks, image blocks, audio blocks, video blocks, and file property entries.

external: (url) => ExternalRef = externalFile

Create an external file reference.

string

ExternalRef

notionFile.external('https://example.com/doc.pdf')

upload: (id) => FileUploadRef = uploadFile

Create a file-upload reference.

string

FileUploadRef

notionFile.upload('upload-id')
import { notionFile } from '@visus-io/notion-sdk-ts';
notionFile.external('https://example.com/doc.pdf')
notionFile.upload('upload-id')