Start a large-file upload (step 1 of 3)
prepare_uploadPublish or replace a file TOO BIG to pass as text to create_page / update_page (anything over ~100 KB, or a ZIP / PDF / image). Requires that you can run shell commands (to run curl) and read the file from disk. Three steps: (1) call prepare_upload — it returns a one-time upload URL, a ready curl command and a ticket; (2) run that curl command in your shell, replacing @FILE with the path to the file (it sends the file's raw bytes, so there is no size limit beyond the plan's file cap); (3) call finish_upload with the ticket to publish. To UPDATE a page you already published and keep its SAME link, pass page (its viewer URL or slug); omit page to make a new link. If curl cannot reach the upload URL (no network access from your sandbox), tell the user to upload with the miinideck CLI (npx miinideck deploy <path>) or the web uploader instead — do not retry with create_page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Optional. The viewer URL or slug of a page you own, to replace its content in place (same link). Omit to create a new page. | |
| title | No | Optional readable label used when making a NEW link. Ignored when `page` is set. | |
| file_kind | Yes | What the file is: 'html' (one HTML file), 'zip' (a multi-file site as a ZIP), 'pdf', 'png' or 'jpeg'. | |
| size_bytes | Yes | The file's exact size in bytes (e.g. from `wc -c`). |