upload_media
Upload a local media file to DingTalk and receive a mediaId, required for sending image, voice, video, or file messages. Handles image, audio, video, and document types up to 20MB.
Instructions
Upload a local media file to DingTalk and get a mediaId. Required before sending image, file, audio, or video messages. Supported file types: image (jpg/png/gif/bmp, max 20MB), voice (amr/mp3/wav, max 2MB), video (mp4, max 20MB), file (doc/docx/xls/xlsx/ppt/pptx/zip/pdf/rar, max 20MB).
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": {
"filePath": "<filePath>",
"mediaType": "<mediaType>"
},
"name": "upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the local file to upload | |
| mediaType | Yes | Media type: image, voice, video, or file |