Skip to content
Preptima
hardDesignScenarioMidSeniorStaff

Users upload files up to 5GB and you must not proxy them through your API servers. How does the upload actually work?

A direct-to-storage upload keeps API servers off the byte path. The API issues short-lived scoped credentials and records a pending row; the client uploads multipart parts to object storage, and a storage event or reconciliation job marks the file ready. It also connects presigned urls to the point an interviewer is testing.

5 min readUpdated 2026-08-15

Answer

Short answer

For 5GB uploads, your API should issue permission, not carry the bytes. Create a pending metadata row, return presigned multipart-upload URLs scoped to one object key, let the client send parts directly to object storage, then mark the row ready only after a storage event or server-side verification. Add cleanup for abandoned multipart uploads and quarantine/scanning before public reads.

Was this answer helpful?

Likely follow-ups

  • The client uploads successfully and then the completion notification is lost. How does that file ever become visible?
  • A user replays a presigned URL they captured an hour ago. What have you allowed them to do?
  • How do you enforce a per-user quota when the bytes never pass through code you control?
  • Where does virus scanning or content validation happen if the object is already in the bucket the moment it lands?

Related questions

Further reading