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
Parameter | Type | Default | Description |
---|---|---|---|
dir | string [Optional] |
/ | Specifies the directory to upload the file into. If it does not exist, it will be created Example: /path/to/folder |
upload_mode | string [Optional] |
try-safe-2000ms | safe 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.
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:
Parameter | Defaul | Description |
---|---|---|
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.
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."
}