Files
openclaw-skill-qiniu/README-OPENCLAW.md
daoqi 1aeae9cc51 initial: 七牛云上传 OpenClaw Skill
功能特性:
- 支持 /upload, /u 命令上传文件到七牛云
- 支持 /qiniu-config 配置管理
- 支持飞书卡片交互
- 支持指定上传路径和存储桶
- 自动刷新 CDN 缓存
- 支持文件覆盖上传

包含组件:
- OpenClaw 处理器 (openclaw-processor.js)
- 独立监听器 (scripts/feishu-listener.js)
- 核心上传脚本 (scripts/upload-to-qiniu.js)
- 部署脚本 (deploy.sh)
- 完整文档

部署方式:
1. 复制 skill 到 ~/.openclaw/workspace/skills/
2. 配置 ~/.openclaw/credentials/qiniu-config.json
3. 重启 OpenClaw Gateway
2026-03-07 16:02:18 +08:00

66 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 七牛云上传 - OpenClaw 集成方案
## 问题说明
飞书独立机器人的文件下载 API (`im/v1/files/{file_key}/download`) 返回 404 错误,无法下载用户上传的文件。
**原因:** 飞书 API 变更或需要特殊权限配置。
## 解决方案
使用 **OpenClaw 内置飞书通道** 来处理文件上传。OpenClaw 已经集成了飞书,可以直接接收和处理文件消息。
### 方案 A使用 OpenClaw 飞书通道(推荐)
OpenClaw 的飞书通道可以直接接收文件消息,然后调用七牛云上传脚本。
#### 配置步骤
1. **确保 OpenClaw 飞书通道已配置**
```bash
openclaw status
```
2. **测试飞书消息接收**
在飞书中发送消息给机器人,查看 OpenClaw 日志:
```bash
openclaw logs --follow
```
3. **使用命令上传文件**
在飞书中发送文件后,使用命令触发上传:
```
/upload /path/to/file.txt
```
### 方案 B手动上传临时
1. 在飞书中下载文件到本地
2. 使用命令行上传:
```bash
cd ~/.openclaw/workspace/skills/qiniu-uploader
node scripts/upload-to-qiniu.js upload --file ~/Downloads/file.txt --key /config/file.txt
```
### 方案 C使用飞书云文档
1. 将文件上传到飞书云文档
2. 使用飞书云文档 API 获取文件
3. 上传到七牛云
---
## 飞书独立机器人状态
```
✅ 机器人运行正常
✅ 卡片交互正常
❌ 文件下载 API 不可用 (404 错误)
```
## 联系支持
如需帮助,请查看:
- 飞书开放平台文档https://open.feishu.cn/document
- 七牛云文档https://developer.qiniu.com/kodo