Back to Registry
View Author Profile
Official Verified
File Upload To Local Workspace
Skill by chengwang86
skill-install — Terminal
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/chengwang86/file-upload-to-local-workspaceOr
file-upload-skill
OpenClaw 文件上传技能 - 通过网页上传文件到本地 workspace供 AI 分析
🎯 与其他上传技能的区别
❌ 我们不是:
- ❌ 云存储服务(不是上传到云端)
- ❌ 图床服务(不是获取外链)
- ❌ 文件分享工具(不是分享给他人)
✅ 我们是:
- ✅ 本地上传 - 文件保存在你的机器上
- ✅ AI 分析 - 上传后让 AI 帮你分析文件内容
- ✅ 私有安全 - 文件不离开你的服务器
- ✅ OpenClaw 集成 - 与你的 AI 助手无缝协作
典型使用场景:
1. 上传 PDF → AI 总结内容
2. 上传截屏 → AI 提取文字
3. 上传日志 → AI 分析问题
4. 上传代码 → AI 审查优化
功能
- 📁 网页端文件上传(支持拖拽)
- 🔐 智能认证:自动适配 Token/Password/无认证
- 🇨🇳 支持中文文件名
- 🚀 一键安装,自动配置
- 📦 独立服务,不影响 Gateway
- 🤖 AI 自动回答上传地址
- 📂 文件列表展示与管理
- 🗑️ 支持文件删除
快速开始
安装
# 方式 1: 从 ClawHub 安装(推荐)
openclaw skills install file-upload
# 方式 2: 本地安装
git clone <repo-url> ~/.openclaw/workspace/skills/file-upload
cd ~/.openclaw/workspace/skills/file-upload
./install.sh
使用
安装后自动启动上传服务,访问:
http://<server-ip>:15170/?token=<your-auth-value>
🔐 认证说明:
- 如果你的 Gateway 配置了 token → 使用 token
- 如果你的 Gateway 配置了 password → 使用 password
- 如果 无认证 → 直接访问(建议配置认证)
💡 如何获取认证值:
# 查看你的认证配置
cat ~/.openclaw/openclaw.json | grep -A3 '"auth"'
询问 AI
用户可以直接问:
- "怎么上传文件给你?"
- "上传地址是什么?"
- "如何发送文件?"
AI 会自动回复正确的上传地址(隐藏敏感信息)
配置
环境变量
# 可选配置,默认值如下
export UPLOAD_PORT=15170 # 上传服务端口(可自定义)
export UPLOAD_PATH="/upload" # 上传页面路径
export WORKSPACE="~/.openclaw/workspace" # 文件保存目录
自定义端口
如果 15170 端口被占用,可以在安装前设置:
export UPLOAD_PORT=18888
openclaw skills install file-upload
openclaw.json 配置
{
"skills": {
"file-upload": {
"enabled": true,
"port": 15170,
"workspace": "~/.openclaw/workspace",
"maxFileSize": "50MB",
"autoStart": true
}
},
"agents": {
"defaults": {
"env": {
"UPLOAD_PORT": "15170",
"UPLOAD_PATH": "/upload"
}
}
}
}
🔐 认证兼容性
技能包支持所有 OpenClaw 认证方式:
| 认证方式 | 配置示例 | 技能包行为 |
|---|---|---|
| Token 认证 | "mode": "token"<br>"token": "xxx" | ✅ 自动读取 token |
| Password 认证 | "mode": "password"<br>"password": "xxx" | ✅ 自动读取 password |
| 无认证 | 无 auth 配置 | ⚠️ 空认证(建议配置) |
| Tailscale | "allowTailscale": true | ⚠️ 空认证 |
前端统一使用:
http://<server-ip>:15170/?token=<认证值>
后端会自动匹配 gateway.auth.token 或 gateway.auth.password。
详见:docs/AUTH-COMPATIBILITY.md
AI 集成
SKILL.md 指令
AI 会读取本文件,了解如何回答上传相关问题。关键指令:
## 如何回答上传地址问题
当用户询问上传文件、发送文件、上传地址时:
1. **不要直接暴露 token/password**
2. **使用占位符**:`<your-auth-value>` 代替真实认证值
3. **提示用户从配置获取**:告诉用户在 `~/.openclaw/openclaw.json` 查找
标准回复模板:
📁 文件上传地址: http://<server-ip>:15170/?token=<your-auth-value>
获取认证值:
- 查看 ~/.openclaw/openclaw.json
- 找到 gateway.auth.token 或 gateway.auth.password
- 替换 URL 中的 <your-auth-value>
或者直接访问:http://<server-ip>:15170/ (无认证配置时不需要参数)
示例对话
用户: 怎么上传文件给你?
AI:
📁 你可以通过网页上传文件给我!
上传地址:
http://<server-ip>:15170/?token=<your-auth-value>
Metadata
AI Skill Finder
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skill Add to Configuration
Paste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-chengwang86-file-upload-to-local-workspace": {
"enabled": true,
"auto_update": true
}
}
}Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.