watchface_upload_file
Upload a watchface file to a Divoom LAN device by providing the file path and metadata.
Instructions
POST /upload with multipart. First JSON part is caller-provided metadata (product-specific Command). 传输文件打包要求:固件在 divoom_http_server_upload_get_file_info 中要求每个文件段必须有 Content-Length,而浏览器 FormData 通常只使用 boundary 分隔、不包含每段 Content-Length。正在实现固件在无 Content-Length 时用 boundary 终止解析,并修复 JSON 段之后定位文件数据的指针计算;编辑器侧改为手动构造带 Content-Length 的 multipart 以提高兼容性。This server builds multipart with per-part Content-Length.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | Optional per-call target override. If omitted, environment variables are used. | |
| filePath | Yes | ||
| metadata | Yes | ||
| filePartName | No | Second multipart part name. Default is current UTC ms timestamp. | |
| fileName | No | Filename in multipart header. Defaults to basename(filePath). |