Pick the fix
Users' private invoices (PDF) must be downloadable only by their owner. Best serving approach?
Hint 1 of 1
Who checks ownership, and who serves bytes?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Private bucket; after an auth check, return a short-lived presigned URL
Correct. The app authorises; storage serves bytes.
The app decides who may read and the bucket serves the bytes. A presigned URL grants one object for a few minutes, so the private bucket never needs to be public.
Why not the others?
- B Public bucket with unguessable names. Anyone with the link can read it forever.
- C Stream every file through the API servers. Works, but wastes app capacity.
- D Email the PDF and delete it. Not a download path.