Remote Upload
Upload remotely files from URL.
Endpoint
http
POST /api/v1/uploadsParameters
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
parent_id | uuid | - | The id of the parent folder. If the id is not set, the files will be uploaded into home location |
urls | array | yes | The array of valid direct file urls to download remotely |
Request example
sh
curl --location --request POST 'https://files.ro/api/v1/uploads' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--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": "You are not authorized"
}json
{
"message": "The given data was invalid.",
"errors": {
"field": [
"The field is required."
]
}
}