summary refs log tree commit diff
path: root/cdn/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'cdn/README.md')
-rw-r--r--cdn/README.md27
1 files changed, 25 insertions, 2 deletions
diff --git a/cdn/README.md b/cdn/README.md
index 6cd6186a..7d8e99b0 100644
--- a/cdn/README.md
+++ b/cdn/README.md
@@ -1,20 +1,26 @@
 # Fosscord-CDN
+
 CDN for Fosscord
 
 ## Run localy:
+
 ```
 npm i
 node dist/
 ```
 
 ## Endpoints:
+
 ### POST `/attachments/<filename>`
+
 ```
 Content-Type: form-data
 
 attachment: File (binary-data)
 ```
+
 ##### Returns:
+
 ```
 {
     "success": boolean,             // true
@@ -23,20 +29,28 @@ attachment: File (binary-data)
     "filename": string              // "lakdoiauej.png"
 }
 ```
+
 ### GET `/attachments/<id>/<filename>`
+
 ```
 requests image from database with given <id> and <filename>
 ```
+
 ##### Returns:
+
 ```
 Content-Type: image/<imageType(png,img,gif)>
 Image
 ```
+
 ### DELETE `/attachments/<id>/<filename>`
+
 ```
 deletes database entry
 ```
+
 ##### Returns:
+
 ```
 Content-Type: application/json
 
@@ -49,7 +63,8 @@ Content-Type: application/json
 <hr>
 
 _(endpoints for crawler):_
-### POST `/external` 
+
+### POST `/external`
 
 ```
 requests crawling of `og:`metadata and the download of the `og:image` property
@@ -59,7 +74,9 @@ Content-Type: application/json
 body:
 {"url": URL}                  // "https://discord.com"
 ```
+
 ##### Returns:
+
 ```
 Content-Type: application/json
 
@@ -72,17 +89,23 @@ Content-Type: application/json
     "ogType": string          // "website"
 }
 ```
+
 ### GET `/external/<id>/<filename>`
-- requests cached crawled image 
+
+-   requests cached crawled image
+
 ```
 url-params:
     :id                       // aHR0cHM6Ly9kaXNjb3JkLmNvbQ==
     :filename                 // discord.png
 ```
+
 ```
 /external/aHR0cHM6Ly9kaXNjb3JkLmNvbQ==/discord.png
 ```
+
 ##### Returns:
+
 ```
 Content-Type: image/<imageType(png,img,gif)>
 Image