Upload File with POST

POST /upload

The POST method accepts files up to 500MB. If you need to upload larger files please refer to the Stream Upload API (PUT). See this section for more information about the upload process.

API Permissions

FILE_UPLOAD

Query Parameters

ParameterTypeDefaultDescription
dirstring
[Optional]
/Specifies the directory to upload the file into. If it does not exist, it will be created
Example: /path/to/folder
upload_modestring
[Optional]
try-safe-2000mssafe The request is blocked and the response is returned only after the file is being successfully stored in at least one storage backend.
try-safe[-xxxms] The request is blocked for the duration of the timeout parameter or until the file is being successfully stored in at least one storage backend - whichever happens first.
quick Returns the response as soon as the Uploader has received the file. This method has the benefit from returning an answer quickly but is unreliable as the actual upload in the storage backend takes place after the response is being returned and there is no acknowledgement from the storage backend.

Try it out

You can upload files using 3 methods:


multipart/form-data request

This is the most common way to upload a file and allows easy integration in HTML forms. The file(s) should be attached to the file parameter:

curl --request POST \
  --url 'https://api.filerobot.com/fusqadtm/upload?dir=/folder' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --header 'X-Filerobot-Key: 19692813e7364ef8ad6a6504d50a12ca' \
  --form file=@yourfile.txt

remotely hosted file

The file(s) will be downloaded from their source URL into the Filerobot store. Click on the API Explorer tab to test the API in live.

host: 'https://api.filerobot.com' path: /fusqadtm/upload method: POST parameters: {} variables: {} headers: Content-Type: 'application/json; charset=utf-8' X-Filerobot-Key: 19692813e7364ef8ad6a6504d50a12ca body: | { "files_urls": [ "http://sample.li/boat.jpg" ] } theme: clouds-midnight curlAPIKey: "" axiosTimeout: 35000 maxContentLength: 150000 render: curl_tab: true

You can provide up to 20 URLs in a single request. Additional files will not be uploaded.


base64-encoded

You can upload base64-encoded content into Filerobot:

ParameterDefaulDescription
name[Required]Specifies the file name after upload.
data[Required]Base64-encoded file.
postactions[Required]decode_base64 decodes the uploaded content after upload to store as file.

Copy-paste the cURL request in your Terminal or click on the API Explorer tab to see the API in action.

host: 'https://api.filerobot.com/fusqadtm' path: /upload method: POST variables: {} headers: X-Filerobot-Key: 19692813e7364ef8ad6a6504d50a12ca Content-Type: application/json body: | { "name": "new_image_from_base64.png", "data": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAABX9AAAV/QHNcFFhAAAAFHRFWHRDcmVhdGlvbiBUaW1lADYvMy8xOAVyVNMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAMNklEQVR4nO3dMWhc14LHYWVZYTESjAoLad1MwAOOG0/AIV5wVikeSJ0DcS93KZ7ZLVzE1ds+LtS5SWfBbrEgw7p6MoQQ7bqQWUPGjZ9hDJnGmcEqNGAL+6nIFgMm2LpjRZ47o7/1feV4PPdiwi/n3nvuOR/9+NsEQIR/GPcJAByUYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQL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fPJwdf+r3hA6jVhGDBiC1ffbhQ723cPHfAJd77Q6c/1Ka3ff51a8CN/yCCBaPWWG7XGs/eeXd8KKrzu8tXH4Y+E3ybYMEYzC7srqxuNjdqBx9qHcLnX7e+vPIo/TLw9wQLxqax3D5z8enWen1rvT7cbDWW2otXHsW9efNOggXjNDWz9+WVRxcutx7fO7W1Xj/Iw74BqvO7jeV2YznvJcEDEiwYv6mZvX5odjqVx/dOtZtzv/x88uBjrlpju9Z4dubi06C1Qw/nox9/G/cpAPvZ6VR63elOq9p/a6fXqex0p6dm9l5vyfPxp9snpv/+wUfq9wQLiOHlZyCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcT4fwvd8vhlstsNAAAAAElFTkSuQmCC", "postactions": "decode_base64" } theme: clouds-midnight curlAPIKey: "" axiosTimeout: 35000 maxContentLength: 150000 render: curl_tab: true

Success

{
    "status": "success",
    "file": {
        "uuid": "340a56bc-8aa7-5b99-8e2a-ba1f9ef50000",
        "name": "new_image_from_base64.png",
        "type": "image/png",
        "size": 3291,
        "sha1": "102c4ec7c78b9dabc3c4d80211e8aea131a69314",
        "meta": {
            "img_h": 400,
            "img_type": "PNG",
            "img_w": 400
        },
        "url_permalink": "https://api.filerobot.com/fusqadtm/v1/get/_/340a56bc-8aa7-5b99-8e2a-ba1f9ef50000/new_image_from_base64.png",
        "url_public": "https://store.filerobot.com/fusqadtm/new_image_from_base64.png",
        "properties": {},
        "overwrite": false
    },
    "info": {
        "company_uuid": "c543bc43-0000-1111-2222-b5293daf15f4",
        "uploaded_files": 1,
        "input_info": {
            "postactions": "decode_base64",
            "name": "new_image_from_base64.png",
            "data": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbAAAAA3...hADMECYggWEEOwgBiCBcT4fwvd8vhlstsNAAAAAElFTkSuQmCC"
        },
        "files_count": 0,
        "project_uuid": "094dd930-ccd3-4945-a051-a55b484678a8",
        "trace": "88utQneu-ov-610.elastic-uploader.airstore.scal3fl3x.comW",
        "version": "ab76d1c",
        "uniq_id": "370af52023774d2aa44b005395afa329",
        "init_db": "atom009:27"
    }
}

Errors

{
    "status": "error",
    "code": "ERR_UNPROCESSABLE_ENTITY",
    "msg": "Sorry, we could not process the upload because the input does not look correct! Please check the parsing and try again",
    "hint": "Please check the docs: http://docs.airstore.io/"
}
{
    "status": "error",
    "code": "ERR_UNAUTHORIZED",
    "msg": "Invalid secret key",
    "hint": "Provide valid secret key."
}