| .. | |||
| jest | 4 years ago | ||
| src | 4 years ago | ||
| tests | 4 years ago | ||
| .env.example | 4 years ago | ||
| .gitignore | 4 years ago | ||
| .swcrc | 4 years ago | ||
| CONTRIBUTE.md | 4 years ago | ||
| Dockerfile | 4 years ago | ||
| README.md | 4 years ago | ||
| package-lock.json | 4 years ago | ||
| package.json | 4 years ago | ||
| tsconfig.json | 4 years ago | ||
| tsconfig.tsbuildinfo | 4 years ago | ||
CDN for Fosscord
npm i node dist/
/attachments/<filename>Content-Type: form-data attachment: File (binary-data)
{
"success": boolean, // true
"message": string, // "attachment uploaded"
"id": snowflake, // "794183329158135808"
"filename": string // "lakdoiauej.png"
}
/attachments/<id>/<filename>requests image from database with given <id> and <filename>
Content-Type: image/<imageType(png,img,gif)> Image
/attachments/<id>/<filename>deletes database entry
Content-Type: application/json
{
"success": true,
"message": "attachment deleted"
}
(endpoints for crawler):
/externalrequests crawling of `og:`metadata and the download of the `og:image` property
--------
Content-Type: application/json
body:
{"url": URL} // "https://discord.com"
Content-Type: application/json
{
"id": string, // "aHR0cHM6Ly9kaXNjb3JkLmNvbQ=="
"ogTitle": string, // "Discord | Your Place to Talk and Hang Out"
"ogDescription": string, // "Discord is the easiest way to talk over voice, video, and text. Talk, chat, hang out, and stay close with your friends and communities."
"cachedImage": string, // "/external/aHR0cHM6Ly9kaXNjb3JkLmNvbQ==/discord.png"
"ogUrl": string, // "https://discord.com/"
"ogType": string // "website"
}
/external/<id>/<filename>url-params:
:id // aHR0cHM6Ly9kaXNjb3JkLmNvbQ==
:filename // discord.png
/external/aHR0cHM6Ly9kaXNjb3JkLmNvbQ==/discord.png
Content-Type: image/<imageType(png,img,gif)> Image