API Documentation

High-performance content delivery network with edge computing capabilities. Upload, manage, and serve your assets globally with lightning-fast speeds.

--
Requests Today
--
Cache Hit Rate
--
Files Stored
--
Bandwidth Today
📚

API Endpoints

GET /files/{filename}

Retrieve a specific file from the CDN with optional image resizing parameters. Supports automatic format conversion and edge caching for optimal performance.

Example Request
GET https://media-cdn.lock-labs.com/files/image.jpg?w=300&h=200&f=webp
Response Headers
{ "Cache-Control": "public, max-age=31536000", "Content-Type": "image/webp", "Access-Control-Allow-Origin": "*" }
GET /api/files

List all uploaded files with metadata including size, upload date, and CDN URLs. Perfect for building file management interfaces and media galleries.

Example Response
{ "files": [ { "name": "1640995200000-image.jpg", "size": 1048576, "uploaded": "2024-01-01T00:00:00.000Z", "url": "https://media-cdn.lock-labs.com/files/1640995200000-image.jpg" } ] }
POST /api/upload

Upload files to the CDN with automatic timestamping and global edge distribution. Accepts multipart/form-data with file validation and progress tracking.

Request Body
Content-Type: multipart/form-data file: [File object]
Success Response
{ "success": true, "filename": "1640995200000-image.jpg", "originalName": "image.jpg", "url": "https://media-cdn.lock-labs.com/files/1640995200000-image.jpg" }
DELETE /api/files/{filename}

Permanently delete a file from the CDN storage and edge cache. Requires the exact filename including timestamp prefix for security.

Example Request
DELETE https://media-cdn.lock-labs.com/api/files/1640995200000-image.jpg
Success Response
{ "success": true }