Skip to content

fileUploadSchema

const fileUploadSchema: ZodObject<{ complete_url: ZodString; content_length: ZodNullable<ZodNumber>; content_type: ZodNullable<ZodString>; created_time: ZodUnion<readonly [ZodISODateTime, ZodISODate]>; expiry_time: ZodNullable<ZodUnion<readonly [ZodISODateTime, ZodISODate]>>; file_import_result: ZodString; filename: ZodString; id: ZodUUID; object: ZodLiteral<"file_upload">; status: ZodEnum<{ expired: "expired"; failed: "failed"; pending: "pending"; uploaded: "uploaded"; }>; upload_url: ZodString; }, $strip>

Defined in: src/schemas/fileUpload.schema.ts:17

Notion file upload object schema.

File uploads represent files uploaded to Notion through the API. Each file upload has a temporary upload URL. Each file upload has one of these states: pending, uploaded, expired, or failed.

Notion API reference: https://developers.notion.com/reference/file-upload-object