cloud-storage-web

Implements browser-side CloudBase storage uploads, downloads, and temporary URLs via @cloudbase/js-sdk.

Updated May 14, 2026
One-click install
npx skills add https://github.com/study-yang/Vieb-Coding-- --skill cloud-storage-web-study-yang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloud-storage-web
Source: https://github.com/study-yang/Vieb-Coding--/tree/main/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8F-%E5%BF%AB%E8%AE%B0/.codebuddy/skills/cloud-storage-web
Command: npx skills add https://github.com/study-yang/Vieb-Coding-- --skill cloud-storage-web-study-yang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @cloudbase/js-sdk.

What problem does it solve? Web developers integrating Tencent CloudBase storage often struggle with correct Web SDK initialization, security-domain (CORS) configuration, and choosing the right API for uploads, downloads, and file management. This Skill provides a complete, correct workflow for browser-side cloud storage operations. ## Core Features & Use Cases - Browser File Uploads: Upload files with app.uploadFile(), including progress callbacks and cloud path conventions. - Temporary URLs & Downloads: Generate time-limited preview/download links with getTempFileURL() and trigger browser downloads with downloadFile(). - Security-Domain Setup: Step-by-step local dev recipe for whitelisting the exact browser origin (host:port) using envQuery and envDomainManagement MCP tools before uploads work. - Use Case: A user building a Vite-based web app needs avatar uploads; the Skill guides SDK init, whitelisting localhost:5173, uploading the file, and resolving a temporary preview URL from the returned fileID. ## Quick Start Use the cloud-storage-web skill to implement a browser file upload to CloudBase storage with a temporary preview URL in my web app.

Frequently Asked Questions about cloud-storage-web

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upload files to CloudBase storage from a browser?

Initialize @cloudbase/js-sdk once with your env ID, then call app.uploadFile() with a cloudPath including the filename and the selected file object. Ensure the browser origin is whitelisted in CloudBase security domains first, and use onUploadProgress for progress display.

How to get a temporary download URL for a CloudBase file?

Call app.getTempFileURL() with a fileList containing the fileID and a maxAge in seconds. It returns a temporary URL valid for that duration, suitable for previewing or downloading private files without exposing a permanent public link.

Why does CloudBase browser upload fail with CORS errors?

Uploads fail when the exact browser origin is missing from the environment's security-domain whitelist. Check current domains with envQuery action="domains", then add the exact host:port (e.g., localhost:5173) via envDomainManagement action="create" and allow a few minutes for propagation.

Can I use @cloudbase/js-sdk storage in WeChat Mini Programs?

No, this Web SDK approach is only for browser-based web apps. Mini Programs use their own file APIs, and backend or agent-side storage management should go through MCP tools instead of the browser SDK.

Should I construct a public URL after uploading to CloudBase storage?

No, never fabricate a URL by concatenating envId, bucket domain, and cloudPath. Use the fileID returned by uploadFile with app.getTempFileURL() to resolve a valid temporary URL for display or download.