Qiniu Upload And Auto Delete
Paste the following prompt into your AI chat to install this skill:
Please install @user_c1c145ab/upload-qiniu-kodo into the current AI assistant following https://skillhub.cn/install/skillhub.md.
About this skill
Problem
Storing OCR screenshots, temporary documents, or internal assets as Base64 can quickly fill database rows with large payloads and slow page rendering. Uploading to object storage without cleanup also leaves temporary files in the bucket long after they are needed. Qiniu Upload And Auto Delete targets this "short-lived file needs a URL and must disappear later" case.
How It Works
The skill accepts a local file path filePath, uploads the file to the configured Qiniu Object Storage bucket, and applies a server-side lifecycle rule. Pass deleteDays to override the default retention; otherwise the global defaultDeleteDays is used. isPrivate controls whether the returned URL is public or private. Private links are better for internal assets, while public links suit temporary previews.
The response includes key, hash, url, deleteAfterDays, deleteAt, and deleteHuman. The hash can be used for integrity checks, and url remains usable until the server-side deletion happens, after which access fails. Applications usually only need to store the key and URL in the database instead of the raw file content.
Boundaries
The skill uploads from a local file path only and does not accept Base64 payloads directly. Auto-deletion is a Qiniu server-side rule, and deleted files cannot be recovered. Private links depend on account key signatures, so changing keys may invalidate old signed URLs. Before use, configure accessKey, secretKey, bucket, domain, region, and defaultDeleteDays, and verify the bound domain, HTTPS setup, and Qiniu bucket permissions.
Use Cases
- Upload OCR handwritten screenshots to Qiniu Cloud, return a temporary URL, and set it for deletion after 7 days.
- Upload internal test images as private signed URLs to avoid public exposure and let them expire automatically.
- Replace Base64 values in the database by storing only the file key and URL, reducing storage size.
- Upload one-off temporary documents, generate accessible URLs, and override the default deletion period.
Best For
- Developers handling OCR images who need temporary screenshot uploads with automatic deletion.
- Engineers publishing internal assets who need private signed URLs to avoid long-term public access.
- Backend developers maintaining file services who want to avoid Base64 blobs in database rows.
- Automation script authors who need temporary file URLs and time-based cleanup from object storage.
Related Skills
Track multiple GitHub projects, check releases and changelogs, and generate structured update summaries with impact analysis.
Creates themed learning sites by generating flashcards, lessons, quizzes, index, and progress pages into a deployable website.
End-to-end mathematical optimization modeling with Gurobi and Python, covering data validation, code generation, solving, result analysis, and iterative revision.
Executes an Eversheet Web CDP login using externally supplied baseUrl, username, and password, then verifies the page reaches a logged-in home state.