Consumer Messaging Platform — WhatsApp-Class System  ·  View 10 of 23

Media Upload and Download Pipeline

Photos, video, documents and voice notes: compressed and encrypted on device, stored as opaque bytes, distributed by CDN.

Editable source SVG draw.io All views
Capture
Capture
Camera, gallery, file
Camera, gallery, file
Client Compression
H.264 / WebP / Opus
Client Compression...
Thumbnail Generation
On device
Thumbnail Generation...
Protect
Protect
Random Media Key
AES-256-CBC
Random Media Key...
HMAC-SHA256 Tag
Integrity
HMAC-SHA256 Tag...
Upload
Upload
Media Service
Resumable, chunked
Media Service...
Object Store
Immutable, TTL 30 d
Object Store...
Blob already stored?
SHA-256 of ciphertext
Blob already stored?...
Reference
Reference
Chat Service
Normal send path
Chat Service...
Message Payload
URL + key + hash
Message Payload...
Distribute
Distribute
CDN Edge
Signed URL, origin pull
CDN Edge...
Inline Thumbnail
Encrypted in payload
Inline Thumbnail...
Consume
Consume
Recipient Device
Verify HMAC, decrypt
Recipient Device...
Media Gallery
On-device, per chat
Media Gallery...
yes, reuse handle
yes, reuse handle
no, store blob
no, store blob
Media Upload and Download Pipeline
Media Upload and Download Pipeline
Application we own
Application we own
Security / platform
Security / platform
Data store
Data store
Decision point
Decision point
Interface / broker
Interface / broker
synchronous
synchronous
The platform stores opaque bytes; the media key travels only inside the encrypted message.
The platform stores opaque bytes; the media key travels only inside the encrypted message.
v 1.0 · owner Platform Architecture · date 2026-08
v 1.0 · owner Platform Architecture · date 2026-08
Text is not SVG - cannot display

Encryption model

  • A fresh AES-256 key per blob, plus an HMAC-SHA256 tag over the ciphertext
  • The key, the hash and the URL travel inside the encrypted message, never with the blob
  • The platform can serve the blob but cannot open it

Efficiency

  • Deduplication on the SHA-256 of the ciphertext, so a forwarded file uploads once
  • Thumbnails are generated on device and embedded in the message payload
  • Resumable chunked upload survives a mobile network changing under it

Limits and retention

  • Documents up to 2 GB, images and video re-encoded to a target bitrate on device
  • Blobs expire after 30 days; a re-download after that requires the sender to resend
  • CDN caches ciphertext only, with signed URLs and short TTLs