Upload a new illustration for a specific word, associated its id.

POST /words/illustration/{id}

Upload a new illustration for a specific word, associated with its id. The illustration can be provided as a link to an image, or based on file upload.

multipart/form-data

Body Required

The id of the word to upload the illustration to, and the ilustration itself. NOTES: The old illustration will be overwritten with the new one.

  • id integer
  • image string(binary)

Responses

  • 200 application/json

    OK, together with the link to the illustration.

    Hide response attribute Show response attribute object
POST /words/illustration/{id}
curl \
 -X POST http://localhost:5000/words/illustration/{id} \
 --cookie "fastapiusersauth=$API_KEY" \
 -H "Content-Type: multipart/form-data" \
 -F "id=42" \
 -F "image=@file"
Response examples (200)
{
  "link": "https://meddict-vinuni.com/illustration/1.png"
}