Upload Media (Popcraft, interactive)
popcraft_media_upload_widgetOpen an interactive file-picker widget for the user to upload an image/video/audio file directly into Popcraft — use this instead of popcraft_media_upload when the client can render MCP Apps widgets and the user should pick/drag a file themselves, or when your shell's egress is blocked (sandboxed client) so the upload recipes cannot run. BEFORE opening it, check the one zero-click alternative: if the file exists anywhere online (Google Drive, Dropbox, any share link), ask the user for the link and use popcraft_media_import_url instead — Popcraft fetches it server-side, so client egress does not matter and the user never has to click anything. The widget uploads from the user's BROWSER, so it works even when both your shell and the user's machine cannot PUT to Popcraft directly. It drives the upload end-to-end (signed URL, PUT, confirm) and, once confirmed, hands the resulting media_id back as the next user message so you can use it as a medias[].value for popcraft_generate_image / popcraft_generate_video / popcraft_generate_audio. Pass type and a specific label naming the exact file you expect.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Restrict the file picker to a media type; omit or "auto" allows image/video/audio | |
| label | No | Optional label shown above the file picker, e.g. "Upload your product photo" | |
| multiple | No | Allow selecting multiple files (default false) | |
| max_files | No | Maximum files accepted (default 10 when multiple, else 1) | |
| min_files | No | Minimum confirmed uploads before the widget hands the media_ids back (default 1) |