Create File Upload Session
create_file_upload_sessionWidget-only helper: mint a one-time upload session so the file upload form can send the selected file to QRCodeKIT without exposing credentials. Not intended for direct use; prefer 'Upload a File → Get a Link & QR'.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filename": "<filename>",
"size_bytes": "<size_bytes>",
"typology": "<typology>"
},
"name": "create_file_upload_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Original filename of the selected file. | |
| typology | Yes | Use 'file' for an arbitrary file or 'pdf' for a PDF. | |
| mime_type | No | MIME type reported by the browser for the selected file. | |
| size_bytes | Yes | Size of the selected file in bytes. Must be at most 50 MB. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | No | HTTP method the widget must use for the upload. | POST |
| max_bytes | Yes | Maximum accepted upload size in bytes. | |
| expires_at | Yes | ISO-8601 timestamp when the session expires. | |
| field_name | No | Multipart field name for the uploaded file. | file |
| session_id | Yes | Opaque backend upload-session identifier. | |
| upload_url | Yes | Single-use URL the widget posts the file to (multipart form data). |