File Upload (Form-Data)
Upload a file using standard multipart/form-data encoding.
Upload files to cloud storage using standard multipart/form-data encoding. Key Features:Documentation Index
Fetch the complete documentation index at: https://docs.sinancode.com/llms.txt
Use this file to discover all available pages before exploring further.
- Standard Format - Uses multipart/form-data encoding, compatible with all HTTP clients
- Large File Support - Supports files up to 50MB
- Auto Detection - Automatically detects file MIME type
- Dual Access - Returns both global and China access URLs
Authorizations
Authorization token obtained from api.sinancode.com
Body
The file to upload (max 50MB)
Response
File uploaded successfully
Public URL to access the uploaded file (global)
"https://upload-tmp.sinancode.com/uploads/user123/abc123def456.png"
Public URL to access the uploaded file (China)
"https://beijing-user-upload-tmp.tos-cn-beijing.volces.com/uploads/user123/abc123def456.png"
Storage key of the uploaded file
"uploads/user123/abc123def456.png"
Hash of the file content (SHA-256 truncated)
"d41d8cd98f00b204e9800998ecf8427e"
File size in bytes
12345
MIME type of the file
"image/png"
Expiration time of the file (ISO 8601)
"2024-01-17T00:00:00.000Z"