POST /api/upload
Request has to be a multipart/form-data
encoded form, with a field called file
containing an image
Headers
Authorization: Bearer <token>
Returns
On success:
{ "status": 200, "delete_code": <deletion_code>, "id": <image_id> }
On error:
{ "status": number, "reason": <reason>, "kind": <error_kind> }
[GET|POST|DELETE] /api/delete?code=<delete_code>
Deletes the image, duh
Chatterino Config
Request URL: | https://cabbit.me/api/upload |
Form field: | file |
Extra headers: | Authorization: Bearer <token> |
Image link: | https://cabbit.me/{id} |
Deletion link: | https://cabbit.me/delete?code={delete_code} |
The Extra headers
field is optional, but it lets you see everything
you uploaded from chatterino on the web interface as well