Base64 File Upload
File Upload
File Upload - Base64
- Upload a file using base64-encoded content
- Returns the file ID and accessible URL after successful upload
POST
Base64 File Upload
Authorizations
All APIs require Bearer Token authentication
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
application/json
Base64-encoded file content
Example:
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk..."
Original filename with extension
Example:
"photo.png"
Whether to automatically clean up the earliest uploaded files when storage is insufficient
Notes:
- Default
true: Automatically evicts the earliest uploaded files - Set to
false: Returns a 403 error directly when storage is insufficient
Example:
true
Response
File uploaded successfully
File ID
Example:
"file-1757165031-a1b2c3"
Original filename
Example:
"photo.png"
Accessible URL of the uploaded file
Example:
"https://cdn.foxapi.cc/uploads/20260319/a1b2c3d4e5f6/photo.png"
File size in bytes
Example:
204800
Upload timestamp
Example:
1757165031