File Upload Process Overview
This guide provides a comprehensive overview of the file upload process using presigned URLs, including supported file types, size considerations, multipart upload details, and encoding requirements.
1. Upload Workflow Overview
The upload process consists of the following steps:
Step 1: Request a Presigned URL
- Initiate a
POST
request to obtain a presigned URL for uploading. - Depending on the file size, choose between:
- Simple Upload : For files ≤ 50MB.
- Multipart Upload : For files > 50MB.
Step 2: Upload the File
Use the provided presigned URL(s) obtained in the response of the previous endpoint(s) to upload your file directly to storage.
HTTP Method:
PUT
Headers:
Content-Type: application/octet-stream
Authorization: No authorization header is required. The presigned URL includes necessary permissions.
Step 3: Trigger Encoding
- After upload, call the POST Video endpoint to begin encoding.
- This step finalizes the upload process and prepares the file for playback or distribution.
2. Supported File Types
You can upload the following file formats:
Video Formats:
.mp4
,.mpg
,.avi
,.flv
,.mkv
,.mov
,.webm
Audio Formats:
.mp3
,.flac
,.m4a
,.ogg
,.wav
Uploading files outside these formats is currently not supported.
3. File Size Considerations
- No enforced size limit, but uploading large files over unstable networks may cause failures.
- For files larger than 50MB, use multipart upload for better reliability and performance.
4. Multipart Upload Details
Multipart upload allows large files to be split into parts and uploaded concurrently.
How It Works:
Initiate multipart upload upload with a
POST
request.You will receive multiple presigned URLs, one for each part of the file.
Upload each part individually, use the following details to upload each part:
HTTP Method:
PUT
Headers:
Content-Type: application/octet-stream
Authorization: No authorization header is required. The presigned URL includes necessary permissions.
After all parts are uploaded, call Complete Multipart Upload to finalize.
If needed, you can abort an in-progress multipart upload by calling the Abort Multipart Upload.
Validation Rules:
- Parts Number Range: Must be between 1 and 10,000.
- Upload parts in order and with correct sizes as specified.
5. Post-Upload: Video Encoding
After a successful file upload, initiate encoding by calling the POST Video endpoint.
- Use the
requestKey
received from the upload response as thedownloadUrl
in your encoding request.
This allows the encoding service to locate and process your uploaded file correctly.
Once encoding is triggered, the system will handle video processing and prepare the content for playback or distribution.
6. S3 Compatibility
The upload system is fully S3 compatible, following Amazon S3 protocols for both simple and multipart uploads.
For technical limitations, advanced use cases, and additional capabilities, refer to:
S3 compatibility ensures you can use existing tools, SDKs, and best practices related to Amazon S3 uploads.