diff --git a/cdn.html b/cdn.html index 65d50a6..b2e5b0a 100644 --- a/cdn.html +++ b/cdn.html @@ -208,18 +208,18 @@ - +

Build it into your app

-

The MBD CDN API is simple. Send a POST request with your file and get back a JSON response with your permanent URL.

+

The MBD CDN API is simple. Send a POST request with your file and get back a JSON response with your permanent URL, size, and file type.

POST Request
-
POST /api/upload HTTP/1.1
+                    
POST https://cdn.danielmorrisey.com/ HTTP/1.1
 Host: cdn.danielmorrisey.com
-Content-Type: application/octet-stream
+Content-Type: [file-mime-type]
 Content-Length: [file-size]
 
 [file-binary-data]
@@ -229,13 +229,26 @@ Content-Length: [file-size]
Response (200 OK)
{
   "success": true,
-  "url": "https://cdn.danielmorrisey.com/uuid-filename.ext",
-  "filename": "uuid-filename.ext",
-  "size": 1024,
-  "type": "image/jpeg",
-  "timestamp": "2026-06-01T12:34:56.789Z"
+  "url": "https://cdn.danielmorrisey.com/user-content/2026-06-01/uuid.ext",
+  "path": "user-content/2026-06-01/uuid.ext",
+  "contentType": "image/jpeg",
+  "fileType": "image",
+  "size": 2048576
 }
+ +
+
Rate Limiting (Response Headers)
+
X-RateLimit-Limit-Files: 30
+X-RateLimit-Remaining-Files: 25
+X-RateLimit-Limit-Bytes: 104857600
+X-RateLimit-Remaining-Bytes: 98765432
+X-RateLimit-Reset: 1719878400
+
+ +
+

Limits: 30 files/day, 100 MB/day, 100 MB/file per IP. Resets at midnight UTC.

+