From 396fec9632680ff16e7199e38edfbd31e933e71c Mon Sep 17 00:00:00 2001 From: Daniel Morrisey <142274379+therealfuntimeswithdanny@users.noreply.github.com> Date: Fri, 30 Jan 2026 10:33:20 -0500 Subject: [PATCH] added CDN --- cdn.html | 2 + cdn/docs.html | 118 ------------------------------------------------- cdn/index.html | 85 ----------------------------------- 3 files changed, 2 insertions(+), 203 deletions(-) create mode 100644 cdn.html delete mode 100644 cdn/docs.html delete mode 100644 cdn/index.html diff --git a/cdn.html b/cdn.html new file mode 100644 index 0000000..c201576 --- /dev/null +++ b/cdn.html @@ -0,0 +1,2 @@ +The MBD CDN is a network of servers located around the world powered by the Cloudflare global network. It's designed to deliver media (images, videos, live broadcasts, etc) at extremely fast speeds with 100% uptime +If you wish to use the MBD CDN please email cdn@danielmorrisey.com \ No newline at end of file diff --git a/cdn/docs.html b/cdn/docs.html deleted file mode 100644 index b533cfa..0000000 --- a/cdn/docs.html +++ /dev/null @@ -1,118 +0,0 @@ - - -
- - -Welcome to the official documentation for the MBD CDN API. This API allows file uploads, statistics retrieval, and regional content serving.
-All API routes are found at https://cdn.madebydanny.uk/
Endpoint: POST /upload
Description: Upload a file to all regions. Maximum file size: 100 MB.
-Form data parameter:
-file — The file to upload.Response: JSON with a universal URL and file key.
-{
- "url": "https://cdn.madebydanny.uk/user-content/2025-10-18/123456_file.png",
- "key": "user-content/2025-10-18/123456_file.png"
-}
- Endpoint: GET /stats
Description: Fetch global statistics about uploaded files and bandwidth.
-Response: JSON object:
-{
- "filesUploaded": 10,
- "totalBandwidth": 1.23, // in GB
- "regionsSupported": 6
-}
- Endpoint: GET /user-content/{path}
Description: Redirects to the nearest regional copy of the file based on the user's location.
-Example:
-GET /user-content/2025-10-18/123456_file.png
-Redirects to:
-https://asia-public-cdn.madebydanny.uk/user-content/2025-10-18/123456_file.png
-
- All endpoints support CORS. Preflight requests (OPTIONS) are handled automatically.
400 — Bad request (e.g., no file uploaded or file too large).404 — Endpoint not found.500 — Internal server error.const fileInput = document.querySelector('#file');
-const formData = new FormData();
-formData.append('file', fileInput.files[0]);
-
-fetch('https://cdn.madebydanny.uk/upload', {
- method: 'POST',
- body: formData
-})
-.then(res => res.json())
-.then(console.log)
-.catch(console.error);
-
- Upload your files to the MBD CDN — free for life, powered by Cloudflare’s global edge network.
-Upload File
- -Drag & drop your file here, or click to select
-Why MBD CDN?
-What is IMRS?
-IMRS, or image media reduction system, transforms images from PNG, JPEG, WEBP, etc. to AVIF, an image type that's smaller and loads quicker but keeps the same high-quality image.
-