Upload one or multiple files

Upload file with POST

POST /v4/files

API Permissions

FILE_UPLOAD

Query Parameters

Parameter Type Default Description
folder string / optional Specifies the directory to upload the file into. If it does not exist, it will be created
Example: /path/to/folder

You can upload files using 3 methods:

Method 1 - 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.

Try it out

curl --request POST \
  --url 'https://api.filerobot.com/fdocs/v4/files?folder=/path' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --header 'X-Filerobot-Key: fa5fe3303dd34e1da4810915c7c3fd6f' \
  --form file=@yourfile.txt

Method 2 - URL(s) of remotely hosted file(s)

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.

Try it out

host: 'https://api.filerobot.com/fdocs' path: /v4/files method: POST parameters: folder: '/api-demo' variables: {} headers: Content-Type: 'application/json' X-Filerobot-Key: fa5fe3303dd34e1da4810915c7c3fd6f body: | { "files_urls": [ { "name": "new_filename.jpg", "url":"http://sample.li/boat.jpg" } ] } theme: clouds-midnight 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.

Method 3 - base64-encoded content

You can upload base64-encoded content into Filerobot.

Parameter Default 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.

Try it out

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/fdocs' path: /v4/files method: POST variables: {} headers: X-Filerobot-Key: fa5fe3303dd34e1da4810915c7c3fd6f Content-Type: application/json body: | { "name": "new_image_from_base64.png", "data": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAABX9AAAV/QHNcFFhAAAAFHRFWHRDcmVhdGlvbiBUaW1lADYvMy8xOAVyVNMAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzbovLKMAAAMNklEQVR4nO3dMWhc14LHYWVZYTESjAoLad1MwAOOG0/AIV5wVikeSJ0DcS93KZ7ZLVzE1ds+LtS5SWfBbrEgw7p6MoQQ7bqQWUPGjZ9hDJnGmcEqNGAL+6nIFgMm2LpjRZ47o7/1feV4PPdiwi/n3nvuOR/9+NsEQIR/GPcJAByUYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhAjH8c9wkA+9vpVHrd6U6r+vL55MTERK9T2elOT83szZ/e6X/h40+3T0z/faHeG+tpjtRHP/427lMo00+3zm6unX3788WVR19eeRRx3KKfKttffrh9wG+O6x855Xz+kJ1O5fG9U+3m3C8/n3z1YvKAf6vW2K41np25+PSDj5cRFozfy+eTj++d2lqv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v6mZvX5odjqVx/dOtZtzv/x88uBjrlpju9Z4dubi06C1Qw/nox9/G/cpAPvZ6VR63elOq9p/a6fXqex0p6dm9l5vyfPxp9snpv/+wUfq9wQLiOHlZyCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcQQLCCGYAExBAuIIVhADMECYggWEEOwgBiCBcT4fwvd8vhlstsNAAAAAElFTkSuQmCC", "postactions": "decode_base64" } theme: clouds-midnight axiosTimeout: 35000 maxContentLength: 150000 render: curl_tab: true

Response

{
  "status": "success",
  "file": {
    "uuid": "0ca1d3db-9e8b-5f91-9ee2-dd79df550000",
    "name": "new_car.jpg",
    "size": {
      "bytes": 1744130,
      "pretty": "1.66 MB"
    },
    "type": "image/jpeg",
    "url": {
      "public": "https://store.filerobot.com/fdocs/api-demo/new_car.jpg",
      "permalink": "https://api.filerobot.com/fdocs/v4/get/0ca1d3db-9e8b-5f91-9ee2-dd79df550000",
      "cdn": "https://fdocs.filerobot.com/api-demo/new_car.jpg?vh=d8e983",
      "path": "/api-demo/new_car.jpg"
    },
    "hash": {
      "sha1": "d8e983646280a7f878e00ef9266fc810264849ac",
      "blur_hash": null
    },
    "created_at": "2021-05-04T13:39:09Z",
    "modified_at": "2021-05-04T13:39:09Z",
    "overwrite": false,
    "folder": {
      "uuid": "7610923e-80d0-50e8-a2e4-c509be390158",
      "name": "/api-demo/"
    },
    "info": {
      "img_type": "JPEG",
      "img_w": 4071,
      "img_h": 2714
    },
    "meta": {}
  },
  "info": {
    "version": 2.19,
    "trace": "-eu-ms-xxxtest.elastic-uploader.airstore.scal3fl3x.com",
    "uniq_id": "6b5d1fe696c84377841dcc3389e05490",
    "project_uuid": "094dd930-ccd3-4945-a051-a55b484678a8",
    "company_uuid": "c543bc43-0000-1111-2222-b5293daf15f4",
    "uploaded_files": 1,
    "files_count": 1,
    "init_db": "atom008:79"
  }
}