Qiniu Upload
Latest: v0.1.0
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.
Full description
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.
Qiniu Upload
Use this skill when a task needs a local file turned into a Qiniu-hosted URL.
Required environment variables
QINIU_ACCESS_KEYQINIU_SECRET_KEYQINIU_BUCKETQINIU_DOMAIN
Optional:
QINIU_ZONE- one ofz0,z1,z2,na0,as0QINIU_PRIVATE_BUCKET-trueto emit signed private URLs by defaultQINIU_PRIVATE_EXPIRE_SECONDS- default expiry for private URLs
Safety rules
- Never hardcode Qiniu credentials.
- Fail fast if any required environment variable is missing.
- Prefer returning both
keyand finalurl. - For local files, verify the path exists before upload.
Primary command
Run the Node script:
node scripts/upload.js --file-path "E:\\audio\\sample.mp3" --prefix audio
Optional flags:
--private- return a signed private URL--expire-seconds 3600- private URL expiry--prefix audio- object key prefix--key my/custom/name.mp3- explicit object key--json- machine-friendly JSON only
Output contract
The script returns JSON like:
{
"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"
}
Domain and access caveat
Some Qiniu domains may sit behind auth or anti-leeching. Upload success does not automatically guarantee anonymous public fetch success. If downstream services need to fetch the object, verify the returned URL is externally accessible, or use private signed URLs / a proper public CDN domain.
Chaining to other skills
After upload succeeds, pass the returned url into downstream skills such as an Aliyun speech transcription workflow.
