Menu

The upload works in the office and dies at 80% on the train. Making large uploads survive mobile networks.
📰

The upload works in the office and dies at 80% on the train. Making large uploads survive mobile networks.

DEV Community: mobile·MinPin Proxy·15 days ago
#4dlhf5iB
#devtomobile#devto#dev#upload#network
Long article (923 words) — no AI summary yet.
Reading 0:00
15s threshold

The bug: users attach a video or a batch of photos, the progress bar gets most of the way, and then the upload fails and starts again from zero. On office Wi-Fi it never happens. On a phone it happens a lot, because a long upload on a mobile network is very likely to hit at least one of these: a network switch (Wi-Fi to cellular), a dead zone, the user leaving the app, or a timeout somewhere between the phone and your server.

A single POST with the whole file in the body has no way to recover from any of them. Here's what does.

1. Find out where it actually fails

Before changing the client, check the path the upload takes. A few limits are hit only by large or slow uploads, and they look like network failures from the phone:

nginx client_max_body_size defaults to 1 MB.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.