# Prepare video upload (`prepare_upload`)
> Opens the inline upload widget in apps that support it, so you can pick a file from your own device. The file uploads straight from your browser to Dadan.
- Area: [Video editing & lifecycle](https://mcp.dadan.io/tools/editing-lifecycle.md)
- Access: Makes changes
- AI credits: no
- Available on read-only connections: no

## Example prompt
"I want to upload a video file from my laptop"

## Parameters
- `title` (string): Title for the video in Dadan. Optional.
- `file_name` (string): File name — supplied by the upload widget once the user picks a file. Omit on the first call.
- `file_size_bytes` (integer): File size in bytes — supplied by the upload widget. Omit on the first call.
- `duration_seconds` (number): Video length in seconds (decimals allowed) — supplied by the upload widget when it can read it. Omit if unknown.

## Description for AI assistants
Prepare a browser-direct upload into Dadan: opens the inline upload widget (in clients that support MCP Apps) where the user picks a local video file; the bytes then go straight from the browser to Dadan's storage — never through the chat or the gateway. Call it with just an optional title to show the picker; the widget itself calls back with file_name, file_size_bytes and duration_seconds to mint the upload ticket. For uploading from a public URL use upload_video instead. Max 500 MB per file. FALLBACK for agents with shell access to a LOCAL file (when the client can't render the widget or its sandbox blocks browser uploads): call this tool yourself with the file's real file_name + file_size_bytes (and duration_seconds, e.g. from ffprobe, so Dadan shows the right length), then TUS-upload the file to the returned tus_endpoint (e.g. with curl) following the ticket's message; Dadan processes it automatically once the bytes land. VISUAL TOOL: the result renders as an interactive card in the chat in clients that support MCP Apps. Call it whenever the user wants to SEE this — do not answer from prior context. After it returns, reply with ONE short sentence; the card shows the details, so never repeat its titles, links, or stats as text.


## Known limitations

- Mints a resumable TUS ticket. Bytes go from the caller straight to upload.dadan.io — they never pass through this gateway or the model. Some client sandboxes block the browser upload widget; in that case perform the TUS flow directly.
Canonical page: https://mcp.dadan.io/tools/prepare-upload
