Posts

Showing posts with the label Cloud Storage

Writing Presigned URL Code for File Storage With LLMs in November 2026: Check Access Before You Sign, Let the Server Pick the Key, and Keep Expiry Short

Image
Presigned URLs (S3 calls them presigned, Google Cloud Storage calls them signed URLs, Azure uses SAS tokens) let a browser upload or download a file straight from object storage without the bytes passing through your server. They are one of the most common things people ask an LLM to write, and the first draft usually works on the first try. That is the problem: "works" here means "anyone holding this link can read or write this object until it expires," and a model writing a quick helper rarely thinks about who gets the link, which object it points to, or how long it lives. This guide walks through how to prompt for presigned URL code, what to check in the result, and the tests that prove it is safe. Examples use the AWS SDK for JavaScript v3 and S3, but the same rules apply to GCS, R2, MinIO, and Azure. A presigned URL works like a coat check ticket: whoever holds it gets the coat, so hand out tickets carefully and only for the right coat. Image: Transit museu...