cloud-storage-web

Manage CloudBase storage objects from browsers using @cloudbase/js-sdk.

Updated May 14, 2026
One-click install
npx skills add https://github.com/williamwang25/ams-admin --skill cloud-storage-web-williamwang25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloud-storage-web
Source: https://github.com/williamwang25/ams-admin/tree/main/.windsurf/skills/cloudbase/references/cloud-storage-web
Command: npx skills add https://github.com/williamwang25/ams-admin --skill cloud-storage-web-williamwang25

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It helps you reliably perform CloudBase object storage operations from a browser so you can upload files, obtain temporary access URLs, download, and delete without guessing URLs or mixing concerns with backend or hosting flows.

Core Features & Use Cases

  • Browser-side Cloud Storage Operations: Upload files from a Web app using @cloudbase/js-sdk, generate temporary URLs for private objects, download, and delete.
  • Safe Temp URL Workflows: Uses returned file identifiers and resolves temp URLs instead of fabricating public-looking links.
  • Security-Domain/CORS Ready: Guides you to add the exact browser origin (host:port) to CloudBase security domains to avoid common frontend upload failures.

Quick Start

Tell the AI: “Explain the exact browser SDK flow to upload a selected image to cloud storage, generate a temporary URL for preview with a 1-hour expiry, and then delete the object using @cloudbase/js-sdk.”

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 directly from a browser using js-sdk?

To upload files to CloudBase storage from a browser, initialize a shared CloudBase Web SDK app instance and call app.uploadFile with the selected file. This handles browser-side object upload without backend code.

Why does my browser upload to CloudBase fail with a CORS error?

Browser uploads to CloudBase fail with CORS errors when the exact browser origin, including host and port, is not added to CloudBase security domains. You must whitelist your caller origin in security domains to allow frontend upload flows.

How do I generate a temporary URL for a private CloudBase storage object?

Generate a temporary URL for a private CloudBase storage object by calling app.getTempFileURL with the returned file identifier. This safely resolves temporary access URLs for previewing private objects instead of fabricating public-looking links.

Can I download and delete CloudBase files entirely in frontend Web app code?

You can download and delete CloudBase files entirely in frontend Web app code by using the @cloudbase/js-sdk. Call app.downloadFile and app.deleteFile appropriately to manage private storage objects directly during Web app scenarios.

What is the best way to manage private storage objects in a Web app using CloudBase?

The best way to manage private storage objects in a Web app using CloudBase is using @cloudbase/js-sdk for browser-side operations. It reliably performs object storage upload, temporary URL generation, download, and deletion while respecting security-domain constraints.