oss-upload

Uploads images to Alibaba Cloud OSS with signed URLs and cross-border timeout recovery.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/bibidu/era --skill oss-upload-bibidu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: oss-upload
Source: https://github.com/bibidu/era/tree/main/.agents/skills/oss-upload
Command: npx skills add https://github.com/bibidu/era --skill oss-upload-bibidu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Cloud Agent uploads from US-West to a Beijing OSS bucket suffer cross-border latency (20-40 KiB/s), causing frequent i/o timeouts and false failure reports on multi-megabyte images. This Skill standardizes uploads through oss-upload.sh with extended read timeouts, stat-based success verification, automatic expired-object cleanup, and correct delivery of signed or permanent cover URLs. ## Core Features & Use Cases - Scripted OSS Upload: Upload images via bash scripts/oss-upload.sh to a private bucket and receive 12-hour signed URLs, with automatic cleanup of objects older than 14 hours. - Permanent Cover Links: Use --cover to mark covers with __cover_keep__ and public-read ACL so social media cover fields never expire. - Timeout Recovery: When ossutil cp exits non-zero, stat the target key and compare Content-Length to confirm whether the object actually landed before retrying. - Use Case: A Cloud Agent generates a 3MB cover image and needs it stored in OSS Beijing. Run OSS_SKIP_CLEANUP=1 bash scripts/oss-upload.sh --cover cover.png, then deliver the returned permanent URL instead of a raw OSS link. ## Quick Start Upload my generated cover image to Alibaba Cloud OSS and give me the permanent URL to store in the social media database.

Frequently Asked Questions about oss-upload

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

FAQPage Schema
How do I upload images to Alibaba Cloud OSS from a script?

Run bash scripts/oss-upload.sh with the local file path to upload to the private bucket and receive a 12-hour signed URL on stdout. Use the --cover flag for permanent public-read cover links or --dir for directory uploads.

Why does ossutil cp timeout on large file uploads?

The Cloud Agent egress is in AWS us-west-2 while the bucket is in oss-cn-beijing, giving only 20-40 KiB/s effective throughput. A 3MB file needs about 90-150 seconds, but the default 20-second read timeout aborts each attempt before completion.

How do I verify an OSS upload succeeded after a timeout error?

Run ossutil stat on the target object key and compare its Content-Length with the local file size. If they match, the object landed despite the client-side timeout, so proceed to sign the URL instead of retrying.

Does Alibaba Cloud OSS support transfer acceleration for cross-border uploads?

OSS offers transfer acceleration via the oss-accelerate endpoint, but this bucket has not enabled it and returns a Transfer Acceleration is not configured error. Enabling it requires manual cloud console changes outside the Agent's scope.

How do I create a permanent OSS URL that never expires?

Use bash scripts/oss-upload.sh --cover with your image, which tags the object with __cover_keep__ and sets public-read ACL for a permanent URL. Normal objects only get 12-hour signed URLs and are cleaned up after 14 hours.