kekupload-server

A backend providing a HTTP REST like interface for uploading files written in rust.

View on GitHub

KekUpload API


POST ~/u/{stream}/{hash}

Terminate an upload stream. See workflow for more information.

Params

stream The stream which you get from the create route. See workflow and stream for more information.


hash The hash of the HTTP body. See workflow and hash for more information.


Request

cURL
curl --request POST \
    --data "kekw"
    --url ~/u/{stream}/efb815e2393a127f19c8caf79f6a5f676aedb62a


Responses

200 - Ok
{
    "success": true
}


400 - Bad Request
{
    "generic": "HASH_MATCH",
    "field": "HASH",
    "error": "Hash doesn't match"
}
{
    "generic": "OVERFLOW",
    "field": "CHUNK",
    "error": "Chunk size exceeded"
}


404 - Not Found
{
    "generic": "NOT_FOUND",
    "field": "STREAM",
    "error": "Stream not found"
}


500 - Internal Server Error
{
    "generic": "FS_WRITE",
    "field": "FILE",
    "error": "Error while writing file: {error}"
}