Account

API Documentation

Upload

POST

Upload files directly or via chunked multipart up to 1GB.

curl -X POST https://the-cdn-website.nploc1209.workers.dev/api/upload \
  -F "file=@photo.png"
Returns: { id, name, size, mime_type, url }

Stream

GET

Stream or download files with HTTP Range seeking and edge caching.

curl -I https://the-cdn-website.nploc1209.workers.dev/f/<file-id>
Headers: Accept-Ranges: bytes, Cache-Control: public, max-age=31536000

Files

GET

List all uploaded files and metadata sorted by date.

curl https://the-cdn-website.nploc1209.workers.dev/api/files
Returns: Array<{ id, name, size, mime_type, created_at }>

Delete

DELETE

Permanently delete a file from R2 storage and the database.

curl -X DELETE https://the-cdn-website.nploc1209.workers.dev/api/files/<file-id>
Status: 200 OK {"success": true}