Uploading files to Effis

Upload file to bucket

POST /<bucket>

Upload a file to Effis under a specific bucket. At the moment, only the attachments bucket is supported.

Parameters

A multipart/form-data body containing the file to be uploaded and whether or not it should be spoiler tagged.

FieldTypeDescriptionDefault
fileFileThe file to be uploaded.
spoiler?BooleanWhether or not this file should be spoiler tagged.false

Returns

A FileData object containing information about the file as processed by Effis. This includes helpful parameters such as the file's id, which can then be used to fetch the file from Effis.

Upload attachment

POST /

This route acts as a shorthand for POST /attachments/, the same logic applies.

Example

curl \
  -F "file=@kaas.png" \
  -F "spoiler=true" \
  https://effis.tooty.xyz/
{
  "id": "370617076959762069670199317",
  "name": "kaas",
  "bucket": "attachments",
  "spoiler": true,
  "metadata": {
    "type": "image",
    "width": 128,
    "height": 128
  }
}