Upload a file by providing a publicly accessible URL. The server will fetch and store the file.
Request
curl --location --request PUT 'https://files.storagecdn.online/upload' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"file_url": "https://example.com/path/to/file.png"
}'
Request Body
{
"file_url": "https://example.com/path/to/file.png"
}
Parameters
Publicly accessible URL of the file to upload
Example
curl --location --request PUT 'https://files.storagecdn.online/upload' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"file_url": "https://file.com/images/sample.png"
}'
Response
Success Response
Status Code: 200 OK
{
"success": true,
"file_url": "https://files.storagecdn.online/image/2b847255-e028-4cf7-a2aa-c638f3e15cbc.webp"
}
Whether the upload was successful
URL to access the uploaded file
Use Cases
- Importing files from external sources
- Migrating files from other storage services
- Best for: Bulk imports, file migrations, webhook integrations
Requirements
- The URL must be publicly accessible (no authentication required)
- The file must be directly downloadable
- HTTPS URLs are recommended