kekupload-server

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

View on GitHub

KekUpload API


Workflow

Workflow of uploading files to KekUpload.

Examples

Upload a text file containing a string

  1. Create a new stream using the create route.
    curl --request POST \
     --data ""
     --url ~/c/txt
    

    which should give you the following response:

    {
     "stream": "{stream}"
    }
    

    Now you need to extract the stream from the response. (Just copy the {stream})


  1. Upload a chunk using the upload route.
    // Please change '{stream}' to the value you extracted earlier.
    curl --request POST \
     --data "kekw"
     --url ~/u/{stream}/efb815e2393a127f19c8caf79f6a5f676aedb62a
    

    which should give you the following response:

    {
     "success": true
    }
    


  1. Finalize the stream using the finish route.
    // Please change '{stream}' to the value you extracted earlier.
    curl --request POST \
     --data ""
     --url ~/f/{stream}/efb815e2393a127f19c8caf79f6a5f676aedb62a
    

    which should give you the following response:

    {
     "id": "{id}"
    }
    


You did it :) Now you can download your file from ~/d/{id}