微信 CDN 文件管理
管理微信 CDN 文件的上传和下载操作
SKILL 名称
| SKILL 名称 | 说明 |
|---|---|
juhecli-wx-cloud | 个微 CDN 云存储 - 上传/下载图片/视频/文件/表情等媒体资源 |
上传文件到 CDN
将图片、视频或文件上传到微信 CDN 服务器。
语法
bash
juhe-cli wx cloud upload '{"file_type": 2, "url": "https://example.com/image.jpg"}'参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| file_type | number | 是 | 文件类型:2=图片, 3=视频, 4=文件 |
| url | string | 是 | 文件的 URL 地址 |
示例
bash
# 上传图片
juhe-cli wx cloud upload '{"file_type": 2, "url": "https://example.com/avatar.jpg"}'
# 上传视频
juhe-cli wx cloud upload '{"file_type": 3, "url": "https://example.com/video.mp4"}'
# 上传文件
juhe-cli wx cloud upload '{"file_type": 4, "url": "https://example.com/document.pdf"}'从 CDN 下载文件
根据文件 URL 或文件 Key 从 CDN 下载文件。
语法
bash
juhe-cli wx cloud download '{"file_type": 2, "file_url": "...", "file_key": "..."}'参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| file_type | number | 是 | 文件类型:2=图片, 3=视频, 4=文件 |
| file_url | string | 是 | 文件的 CDN URL |
| file_key | string | 否 | 文件的唯一标识 Key |
示例
bash
# 下载图片
juhe-cli wx cloud download '{"file_type": 2, "file_url": "https://cdn.example.com/image.jpg", "file_key": "123456"}'
# 下载视频
juhe-cli wx cloud download '{"file_type": 3, "file_url": "https://cdn.example.com/video.mp4", "file_key": "789012"}'