Mobile apps · Mixed

Files, media and uploads from the device

In one line: A photo from the camera weighs dozens of times more than needed — handle it on the device before it touches the network.

Before the upload

Resize and compress on the device. In most uses, a width of 1600 pixels and medium compression quality are entirely enough and cut the weight by an order of magnitude.

Strip location data from the image unless explicitly needed — that's a quiet, common privacy leak.

The upload itself

For large files, upload in parts with the ability to resume after a disconnect. Show real progress, and allow cancellation.

Upload directly to object storage with a short-lived signed address, instead of passing the file through your server. That's cheaper, faster, and lowers load.

After the upload

Processing — generating thumbnails, converting formats, scanning — belongs to a background process. Don't keep the user waiting for it. And make sure the file type is checked on the server and not by the extension.

Going deeper

Set a retention policy for media: what gets deleted, when, and how. Media storage is usually the line item that grows fastest in the cloud bill, and it almost never has a defined owner until someone notices the invoice.