bknd-serve-files
Use when serving uploaded files to users. Covers API-proxied file serving, direct storage URLs (S3/R2/Cloudinary), CDN configuration, public file URLs, caching headers, image optimization with Cloudinary, and serving files in frontend applications.
npx skills add majiayu000/claude-skill-registry --skill bknd-serve-files-cameronapak-freedom-stack-v3-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Serve Files Serve uploaded files from Bknd storage to users via API proxy or direct storage URLs. ## Prerequisites - Media module enabled in Bknd config - Storage adapter configured (S3, R2, Cloudinary, or local) - Files uploaded via `bknd-file-upload` skill - For CDN: storage provider with CDN support (S3/R2/Cloudinary) ## When to Use UI Mode - Admin panel > Media section > view/preview files - Copy file URLs from admin interface - Quick verification that files are accessible ## When to Use Code Mode - Build file URLs programmatically - Configure CDN or custom domains - Implement image optimization - Access control for file downloads ## File Serving Methods Bknd supports two approaches to serve files: | Method | Use Case | Performance | Control | |--------|----------|-------------|---------| | API Proxy | Simple setup, private files | Moderate | Full (auth, permissions) | | Direct URL | High traffic, public files | Best (CDN) | Limited (bucket ACLs) | ## Step-by-Step: API Proxy (via Bknd) Files served through Bknd API at `/api/media/file/{filename}`. ### Step 1: Get File URL ```typescript import { Api } from "bknd"; const api = new Api({ host: "http://localhost:7654" }); // Buil
- Prerequisites
- When to Use UI Mode
- When to Use Code Mode
- File Serving Methods
- Step-by-Step: API Proxy (via Bknd)
- Step 1: Get File URL
- Step 2: Display in Frontend
- Step 3: Download File (SDK)
- Step 4: Verify Access
- Step-by-Step: Direct Storage URLs
- S3/R2 Direct URLs
- Cloudinary Direct URLs
- Building URLs in Code
- CDN Configuration
Test file access curl -I http://localhost:7654/api/media/file/image.png Response includes: Client can use conditional requests curl -H "If-None-Match: \"abc123\"" \ Returns 304 Not Modified if unchanged Fails without auth curl http://localhost:7654/api/media/file/private.pdf Works with auth curl -H "Authorization: Bearer $TOKEN" \
What does the bknd-serve-files skill do?
Use when serving uploaded files to users. Covers API-proxied file serving, direct storage URLs (S3/R2/Cloudinary), CDN configuration, public file URLs, caching headers, image optimization with Cloudinary, and serving files in frontend applications.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill bknd-serve-files-cameronapak-freedom-stack-v3-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
