Upload a file
file_upload_urlGet a short-lived URL to upload ONE file from disk to Tuqui, without retyping it. Only for a client that can run commands: you run curl on the file in your disk. Without a shell (a web chat), ask the user to attach the file in Odoo instead. Pass the file's size in bytes and its sha256, read from the commands: the upload is refused unless what arrives matches both. Returns a ready curl command and a reference 'tuqui-upload:' that stands for the file in ONE later call: upload_refs of odoo_message_post attaches it to a record's chatter, an image goes inside an html field as with odoo_html or odoo_write, and upload_files of odoo_create / odoo_write puts it in a Binary field. Up to 10 MB: images, PDF, CSV, text, JSON, office, zip and audio.
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>",
"mimetype": "<mimetype>",
"size": "<size>",
"sha256": "<sha256>"
},
"name": "file_upload_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | Size in bytes, from `stat -c %s <file>` (or `wc -c < <file>`). | |
| sha256 | Yes | SHA-256 of the file's bytes, in hex — the output of `sha256sum <file> | cut -d' ' -f1`. Read it from the command; do not compute it yourself. | |
| filename | Yes | The file's name as it should appear in Odoo, e.g. 'captura.png'. | |
| mimetype | Yes | The file's MIME type, e.g. 'image/png' or 'text/csv'. |