Actions25
媒体管理 → 上传临时素材
AI-generatedSummary
Upload a temporary media file to WeChat Work, specifying the type of media and providing the file data from a binary input field.
Inputs
- 媒体文件类型 (required) — Type of the media file to upload: image, voice, video, or file.
- 文件 (required) — The name of the binary input field that contains the file data to upload.
Output shape
a JSON object containing details of the uploaded media, including a temporary media_id valid for three days.
The media_id returned by this operation is temporary and valid for only three days. The file data must be provided in a binary field in the input item under the specified inputDataFieldName.
Examples
Example 1: Uploading an image file
Set the media file type to '图片' (image) and specify the binary field name containing the image data.