A simple website that allows you to upload files to Discord's CDN without having to do it in their app.
Git (optional)
git clone https://github.com/spinfal/cdn-slave.git
or download the ZIP file and extract it
cd cdn-slave
- Rename Global.example.js to
Global.js
- Go to https://discord.com/developers/applications and create bot
- Make sure this is enabled
- Invite the bot to your server using this link:
https://discord.com/api/oauth2/authorize?client_id=INSERT YOUR APPLICATION ID&permissions=52224&scope=bot
- Configure the
Global.js
file
npm i
npm run start
or
npm run dev
The website will be up @ http://localhost:443 (unless you've changed the config)
Files uploaded on the site will be available in the channel that you set in Global.js
CDN Slave can also be used with ShareX! Follow these steps to get it working (don't want to follow steps? click here to download the config):
- Copy the upload endpoint. If using localhost it will be
http://localhost:443/api/upload
, or if you're using my instance it will behttps://cdn-slave.spin.rip/api/upload
- Open ShareX and go to
Destinations
>Custom uploader settings
> ClickNew
- Name it whatever you want & paste the upload endpoint in
Request URL
- Under
Destination type
, selectImage uploader
,Text uploader
, andFile uploader
- Body should be
Form data (multipart/form-data)
andFile form name
should just befile
. - In the headers section, set the name to
Upload-Source
and the value toAPI
- Select your new ShareX config in the dropdowns at the bottom left of your screen
- Have fun with your new CDN slave.