Legendary Trio
devlogquedulaapi

Devlog #24: Handling large video files

TikTok accepts video files up to several gigabytes. Working with files of that size via ordinary HTTP requests is a bad idea.

For user-side upload we use multipart upload via presigned URLs directly to object storage. This means the video doesn't pass through our server — the client uploads directly to storage.

For transferring to the TikTok API we use the chunked upload that the API provides. Chunk size is chosen based on the file size.

One practical point: large files need to be deleted from storage in a timely manner. We added a background cleanup process that deletes files for published and deleted posts on a schedule.