Link Search Menu Expand Document

Upload

/api/v2/upload/

Post


Purpose

To allow a user to upload a media file.

Body Content [input]

form "multipart/form-data"
input type="file"

Returns if valid [output]

{
    name: string,
    path: string,
    error: 0
}

What the API does

  • Ensures that the file has an extension of “.png”, “.svg”, “.jpg”, “.jpeg” or “.gif”, and that it has a max size of 10485760 bytes (10 MB).

Note: The link returned (res.data.path) needs to be prefixed by uploads.konnect.dev to access the media resource.