Upload a file as a base64-encoded string in JSON format. Base64 string can be either raw or data string.
Request
curl --location --request PUT 'https://files.storagecdn.online/upload' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"base64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
}'
Request Body
{
"base64": "YOUR_BASE64_ENCODED_FILE_STRING"
}
Parameters
Base64-encoded file content
Example
curl --location --request PUT 'https://files.storagecdn.online/upload' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"base64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
}'
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
- Uploading files from web applications
- When file is already in base64 format
- Best for: Browser-based uploads, embedded images, API integrations
Notes
- Ensure your file is properly base64-encoded before sending
- Base64 encoding increases file size by approximately 33%
- Maximum file size may be limited by your API plan