Skip to content

Files

With Files, we are introducing an additional module to store large amounts of data. Instead of storing the raw files inside the storage module in a bucket, you can now upload a complete binary file to the server and receive a link, which you can later use to stream or even download again.

When uploading a file, you will receive an object like this if it was a successful operation.

{
    "status": 200,
    "message": "Uploaded the following files.",
    "body": [
        {
            "result": true,
            "o_name": "test.png",
            "name": "f1632007417b52791f64922703137f42d43efab969fb8b8c1c9test.png",
            "mime": "image\/png", 
            "size": 8756,
            "token": "a65cc2302e9ee9ce160e3d9ade4d992d5b68261d5a234199305f87e9ba13cb85", 
            "url": "https:\/\/api.schmuckli.cloud\/client_api\/v1\/files\/?filename=f1632007417b52791f64922703137f42d43efab969fb8b8c1c9test.png&token=a65cc2302e9ee9ce160e3d9ade4d992d5b68261d5a234199305f87e9ba13cb85"
        }
    ]
}

In the body, you will see a list of the uploaded files. The result property gives information about, if the given file has been uploaded. And it contains some information about the MIME type or the size. Additionally, it will return an access token as well as the hashed file name to access it later.