Docs
RequestsRequests
Some basics about sending requests to our upload server.
Our upload server is used to send POST
requests containing files uploaded through
sharex to our website, database and bucket/cdn. You can interact with it outside of
sharex so long as you have basic knowledge regarding using a restful api!
Base URL
https://cordx.lol/api/upload/sharex
Required headers
Prop | Type | Default |
---|---|---|
userid | STRING | - |
secret | STRING | - |
Basic Usage
Before you get started please make sure you:
- Prepare your file for upload: The file you want to upload should be included in the body of the POST request.
- The maximum file size is currently
500 MB
for all users.
- The maximum file size is currently
- Set the necessary headers: Include the following headers in your request:
secret
: This should be the secret associated with your user account.userid
: This should be your Discord User ID/Snowflake.
- Send the POST request: You can use any HTTP client to achieve this.
NOTE
- custom domains can interact with this api using the
/api/upload/sharex
endpoint! - Your
userid
andsecret
can be obtained in your/me/config
page or by using the/profile
command in our discord bot!
Curl Example
Fetch Example
NOTE
- Both
fetch
andformData
are built in libraries/API's. - This code should serve only as a template and may not work.
sharex
is a File object representing the file to upload
Last updated on