File uploads: S3 presigned URLs, validation and the real cost of storage

Receive files without routing them through your server or blowing up storage costs

Data reviewed on Sep 8, 2026 · LLM Stats indexes and official prices

The data, today

The context

Receiving files looks simple until 2 GB videos arrive. Routing every upload through your server consumes bandwidth, memory and request time. The usual pattern is for the server to issue a short-lived presigned URL and for the browser to upload straight to object storage; your server only authorizes and records.

The other side is cost. Storage is paid per GB per month, but also per request and, above all, for the data transferred out when serving it. Before choosing a provider, estimate all three with your real pattern. Codifly's storage catalog and real-cost guide start from official rates.

What to decide

  1. 1

    Upload through my server or with a presigned URL?

    With a presigned URL: the server validates who is uploading, what type and what maximum size, and issues a URL that expires in minutes. The file never passes through your infrastructure. For large files, use multipart upload.

  2. 2

    What do I validate, and when?

    Before signing, validate the user, declared type and maximum size. After the upload, check the actual content, because the declared type can be forged, and scan the file if it will be served to other users. Store under names you generate, not the user's.

  3. 3

    What does it really cost?

    Add three parts: GB stored per month, read and write requests, and data transferred out. Egress is the one that surprises you when files are served heavily. Compare providers in the storage catalog with your volume, not on price per GB alone.

Common mistakes

  • Routing every file through your application server.
  • Trusting the MIME type or extension the client declares.
  • Comparing providers on price per GB alone without counting egress.

Tools and comparators

Guides to go deeper

Want a recommendation for your case?

Tell us your volume and the options you are weighing. We reply in writing with the numbers of your real usage; no commitment.

Request advice

No provider pays for its position. Indexes come from LLM Stats; prices from each provider's standard API. How we measure

The Codifly brief

A clearer perspective.
In your inbox.

Analysis, guides and new technology comparisons.

You can unsubscribe whenever you like.