Skip to main content

Welcome to File Upload API

The File Upload API provides flexible and efficient file upload services, supporting multiple upload methods to meet diverse business needs. Whether it’s remote file migration, large file transmission, or quick small file uploads, our API offers the best solutions for your requirements.

Base64 Upload

Base64 encoded file upload, suitable for small files

File Stream Upload

Efficient binary file stream upload, ideal for large files

URL File Upload

Automatically download and upload files from remote URLs
File uploads are free - No charges apply for uploading files to our service. You can upload files without worrying about upload costs or fees.
Important Notice: Uploaded files are temporary and will be automatically deleted after 3 days. Please download or migrate important files promptly.

Authentication

All API requests require authentication using Bearer tokens. Please obtain your API key from the API Key Management Page.
Please keep your API key secure and never share it publicly. If you suspect your key has been compromised, reset it immediately.

API Base URL

Authentication Header

Quick Start Guide

Step 1: Choose Your Upload Method

Select the appropriate upload method based on your needs:
Suitable for downloading and uploading files from remote servers:

Step 2: Handle Response

Upon successful upload, you’ll receive a response containing file information:

Upload Method Comparison

Choose the most suitable upload method for your needs:

URL File Upload

Best for: File migration, batch processingAdvantages:
  • No local file required
  • Automatic download handling
  • Supports remote resources
Limitations:
  • Requires publicly accessible URL
  • 30-second download timeout
  • Recommended ≤100MB

File Stream Upload

Best for: Large files, local filesAdvantages:
  • High transmission efficiency
  • Supports large files
  • Binary transmission
Limitations:
  • Requires local file
  • Server processing time

Base64 Upload

Best for: Small files, API integrationAdvantages:
  • JSON format transmission
  • Easy integration
  • Supports Data URL
Limitations:
  • Data size increases by 33%
  • Not suitable for large files
  • Recommended ≤10MB

Practical Examples

Batch File Upload

Using file stream upload to handle multiple files:

Error Handling

Common errors and handling methods:

Best Practices

  • Small files (≤1MB): Recommended to use Base64 upload
  • Medium files (1MB-10MB): Recommended to use file stream upload
  • Large files (>10MB): Must use file stream upload
  • Remote files: Use URL upload, note 100MB limit
  • Implement concurrency control to avoid uploading too many files simultaneously
  • Consider chunked upload strategies for large files
  • Use appropriate retry mechanisms to handle network issues
  • Monitor upload progress and provide user feedback
  • Keep API keys secure and rotate them regularly
  • Validate file types and sizes
  • Consider encrypted transmission for sensitive files
  • Download important files promptly to avoid 3-day deletion
  • Implement comprehensive error handling logic
  • Log uploads for troubleshooting
  • Provide user-friendly error messages
  • Offer retry options for failed uploads

File Storage Information

Important Notice: All uploaded files are temporary and will be automatically deleted after 3 days.
  • Files are immediately accessible and downloadable after upload
  • File URLs remain valid for 3 days
  • The system provides an expiresAt field in the response indicating expiration time
  • It’s recommended to download or migrate important files before expiration
  • Use the downloadUrl field to get direct download links

File Name Behavior

fileName Parameter Details:
  • Optional: If not provided, a random file name will be automatically generated
  • File Overwriting: If a file with the same name already exists in the same path, the old file will be overwritten
  • Caching: Due to CDN caching mechanisms, file overwrites may not take effect immediately and could take several minutes to propagate

Status Codes

Success
Request processed successfully, file upload completed
Bad Request
Request parameters are incorrect or missing required parameters
Unauthorized
Authentication credentials are missing or invalid
Method Not Allowed
Request method is not supported, please check HTTP method
Server Error
An unexpected error occurred while processing the request, please retry or contact support

Next Steps

URL File Upload

Learn how to upload files from remote URLs

File Stream Upload

Master efficient file stream upload methods

Base64 Upload

Understand Base64 encoded file uploads

Support

Need help? Our technical support team is here to assist you.

Ready to start uploading files? Get your API key and begin using the file upload service immediately!