返回顶部
q

qiniu-upload七牛云上传

Upload local files to Qiniu Cloud and return a publicly accessible URL (or signed private URL). Use when the user wants to upload a local file path to Qiniu, obtain a CDN/public URL, prepare files for downstream cloud processing, or convert local audio/video/documents into externally accessible URLs for other skills such as speech transcription.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
130
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

qiniu-upload

七牛上传

当任务需要将本地文件转换为七牛托管的URL时,使用此技能。

必需的环境变量

  • - QINIUACCESSKEY
  • QINIUSECRETKEY
  • QINIUBUCKET
  • QINIUDOMAIN

可选:

  • - QINIUZONE - 可选值:z0、z1、z2、na0、as0
  • QINIUPRIVATEBUCKET - 设置为 true 默认生成签名的私有URL
  • QINIUPRIVATEEXPIRESECONDS - 私有URL的默认过期时间

安全规则

  • - 切勿硬编码七牛凭证。
  • 如果缺少任何必需的环境变量,立即失败。
  • 优先同时返回 key 和最终的 url。
  • 对于本地文件,在上传前验证路径是否存在。

主要命令

运行Node脚本:

powershell
node scripts/upload.js --file-path E:\\audio\\sample.mp3 --prefix audio

可选标志:

  • - --private - 返回签名的私有URL
  • --expire-seconds 3600 - 私有URL过期时间
  • --prefix audio - 对象键前缀
  • --key my/custom/name.mp3 - 显式指定对象键
  • --json - 仅返回机器友好的JSON格式

输出约定

脚本返回类似如下的JSON:

json
{
success: true,
bucket: example-bucket,
key: audio/uuid.mp3,
url: https://cdn.example.com/audio/uuid.mp3,
isPrivate: false,
size: 12345,
mimeType: audio/mpeg,
sourcePath: E:\\audio\\sample.mp3
}

域名与访问注意事项

某些七牛域名可能位于认证或防盗链之后。上传成功并不自动保证匿名公共获取成功。如果下游服务需要获取该对象,请验证返回的URL是否可从外部访问,或使用私有签名URL/合适的公共CDN域名。

与其他技能的链接

上传成功后,将返回的 url 传递给下游技能,例如阿里云语音转录工作流。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 qiniu-upload-1776195543 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 qiniu-upload-1776195543 技能

通过命令行安装

skillhub install qiniu-upload-1776195543

下载

⬇ 下载 qiniu-upload v0.1.0(免费)

文件大小: 4.46 KB | 发布时间: 2026-4-17 15:52

v0.1.0 最新 2026-4-17 15:52
Initial release of qiniu-upload skill.

- Enables uploading local files to Qiniu Cloud with public or signed URL return.
- Requires Qiniu access credentials and bucket/domain as environment variables.
- Provides command-line script for file upload with flexible options (privacy, key naming, expiration).
- Ensures file path verification and immediate failure if config is missing.
- Standard JSON output includes file key, URL, size, privacy, and source path.
- Designed for chaining uploads into downstream workflows like speech transcription.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部