Skip to content

Remote Upload

Upload remotely files from URL

Endpoint

http
POST /api/v1/requests/{file_request_id}/uploads

Parameters

Path parameters

ParameterTypeRequiredDescription
file_request_idstringyes-

Body parameters

ParameterTypeRequiredDescription
parent_iduuid-The uuid of the parent folder. If it's not set, then the files will be uploaded into home location
urlsarrayyesThe array of valid file urls to download remotely

Request example

sh
curl --location --request POST 'https://files.ro/api/v1/requests/{file_request_id}/uploads' \
--header 'Content-Type: application/json' \
--data-raw '{
  "parent_id": null,
  "urls": [
    "https://images.pexels.com/photos/11713102/pexels-photo-11713102.jpeg?cs=srgb&dl=pexels-yana-moroz-11713102.jpg&fm=jpg"
  ]
}'

Response

json
{
  "type": "success",
  "message": "Files was successfully uploaded."
}
json
{
  "type": "success",
  "message": "Files were successfully added to the upload queue."
}
json
{
  "type": "error",
  "message": "Access Denied"
}
json
{
  "message": "The given data was invalid.",
  "errors": {
    "field": [
      "The field is required."
    ]
  }
}