cos-upload

Upload files to Tencent Cloud COS (Cloud Object Storage). Use when the user needs to upload images, documents, or any files to Tencent Cloud COS. Supports environment variables or command-line arguments for configuration. Automatically generates accessible URLs and signed URLs with 24-hour expiration.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "cos-upload" with this command: npx skills add parsonssss/upload-files-to-get-online-url

COS Upload

Upload files to Tencent Cloud COS (腾讯云对象存储) with automatic URL generation.

Quick Start

Method 1: Using Environment Variables

Set these environment variables:

export TENCENT_SECRET_ID=your-secret-id
export TENCENT_SECRET_KEY=your-secret-key
export TENCENT_COS_BUCKET=your-bucket-name
export TENCENT_COS_REGION=ap-guangzhou
export TENCENT_COS_PATH=uploads/  # optional

Then upload:

node cos-upload.js /path/to/file.png

Method 2: Using Command Line Arguments

node cos-upload.js /path/to/file.png \
  --secret-id AKIDxxx \
  --secret-key xxx \
  --bucket my-bucket-1250000000 \
  --region ap-guangzhou \
  --path images/

Output

On successful upload, returns:

  • Direct URL: https://{bucket}.cos.{region}.myqcloud.com/{key}
  • Signed URL: Pre-signed URL with 24-hour expiration (for private buckets)
  • COS Key: The object key in the bucket

Configuration Priority

  1. Command line arguments (highest priority)
  2. Environment variables
  3. Default values

Environment Variables

VariableRequiredDescription
TENCENT_SECRET_IDYesTencent Cloud API Secret ID
TENCENT_SECRET_KEYYesTencent Cloud API Secret Key
TENCENT_COS_BUCKETYesCOS bucket name (e.g., my-bucket-1250000000)
TENCENT_COS_REGIONYesCOS region (e.g., ap-guangzhou, ap-nanjing)
TENCENT_COS_PATHNoUpload path prefix (default: uploads/)

Command Line Options

OptionDescription
--secret-idTencent Cloud API Secret ID
--secret-keyTencent Cloud API Secret Key
--bucketCOS bucket name
--regionCOS region
--pathUpload path prefix

Notes

  • Files are uploaded with auto-generated unique names: upload_{timestamp}_{random}.{ext}
  • Supports all file types (images, documents, videos, etc.)
  • Uses 5MB multipart upload threshold for large files
  • Automatically generates both direct and pre-signed URLs

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Novel Workshop

多模型命题小说创作工坊。用户给出写作命题,自动完成:AI 写初稿 → 三路并行审阅(逻辑/文学/锐评)→ AI 改稿 → 飞书文档完整存档。 一键启动,全程自动,零手动干预。支持飞书实时进度推送。 触发词:命题写作、写一篇小说、命题小说、创作工坊、novel workshop

Registry SourceRecently Updated
General

Openclaw Commerce Shopify

Shopify store management through OpenClaw Commerce API

Registry SourceRecently Updated
General

Article Extract

提取微信公众号、博客、新闻等网页的正文内容,绕过反爬机制,纯文本输出。

Registry SourceRecently Updated
General

Compensation & Salary Benchmarking

Build competitive compensation plans using market data, salary bands, equity, bonuses, geographic pay adjustments, and retention risk scoring.

Registry SourceRecently Updated
68901kalin