File Stream Upload
File Upload
File Upload - Stream
- Upload a file using multipart/form-data stream
- Returns the file ID and accessible URL after successful upload
POST
File Stream Upload
Authorizations
All APIs require Bearer Token authentication
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
multipart/form-data
The file to upload
Custom file name (with extension), uses the original file name if not provided
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