2.6k
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill ephemeral-media-hosting- _meta.json305 B
- SKILL.md18.7 KB
Overview
This skill provides a lightweight ephemeral media hosting system with automatic deletion, MIME validation, fetch-and-cache patterns, and example nginx and upload handlers. It targets chat-sharing workflows where media should be available briefly (default 7 days) and then removed automatically. The scripts are ready to adapt to small VPS or container deployments.
How this skill works
It organizes media under a predictable directory layout (/var/www/media with temp, uploads, processed, logs, scripts) and enforces retention via a cron-driven cleanup script. Uploads and external fetches run through validation: MIME type checks, extension consistency, size limits, optional ClamAV scanning, and metadata creation. nginx configuration and a simple PHP handler show integration points for serving, rate-limiting, and upload endpoints.
When to use it
- Provide temporary image/video hosting for chat apps or bots with automatic expiry
- Cache and serve remote images safely before posting them into chats
- Offer a short-term media dropbox for user-submitted files with minimal infrastructure
- Protect permanent storage by funneling transient content into an isolated temp area
- Prototype a privacy-friendly share link system that removes content after retention period
Best practices
- Run the cleanup script from cron at off-peak hours (example: daily at 02:00) and monitor its logs
- Validate MIME with file/finfo and enforce extension consistency to avoid content-type spoofing
- Apply nginx rate limits and client_max_body_size to prevent abuse and large uploads
- Keep uploads and temp directories owned by the web server user with restrictive permissions (e.g., 775/755 patterns shown)
- Enable optional malware scanning (ClamAV) and log uploads and deletions for auditability
Example use cases
- Bot fetch-and-cache: fetch external images, validate, create public temp URL for chat bots
- One-off sharing: let users upload images/videos that expire after seven days
- Archive-safe preview: fetch remote media into a temp cache before embedding in long-term archives
- Automated cleanup pipeline: daily cron deletes expired files and rotates logs to control disk usage
FAQ
Yes. The retention period is a configurable variable (RETENTION_DAYS) in the configuration and cleanup scripts; change it and redeploy cron entries.
How are MIME spoofing and oversized files handled?
Files are checked with file/finfo for MIME, compared against an allowed list, verified against extensions, and rejected if over the configured max size (default 10 MB).
Is virus scanning mandatory?
No. ClamAV is used if available; scripts will warn and continue when ClamAV is not installed. For higher security, install and enable ClamAV.