TL;DR: Put customer-support media in private object storage and upload it directly with signed URLs; do not relay recordings or screenshots through the application server. Keep originals and thumbnails under separate, immutable keys, use multipart upload for large files, and apply lifecycle rules to disposable derivatives. Sustained throughput and recovery from a failed part matter more here than a tiny storage-price difference.
The deciding constraint is the byte path. A 900 MB screen recording routed through the app consumes resources in a process whose real job is authorization. A signed upload lets that process issue a short-lived capability and leaves the bytes to storage. The app still owns policy. It just stops being a pipe.
Should object storage hold generated images and thumbnails?
A single-request upload has fewer moving pieces. It also makes a late network failure expensive: the browser starts the object again. Multipart upload narrows that failure domain to one part and permits bounded parallelism. That is the mechanism worth optimizing.
Use separate keys such as tickets/t_82/media/m_194/original/sha256-value and tickets/t_82/media/m_194/thumb/320/sha256-value. Unique names matter because this storage surface has no object versioning: overwriting a thumbnail destroys the prior file. It also lacks conditional If-Match writes, so strict concurrent mutation needs a database or queue. Immutable keys avoid most of that fight.
Lifecycle rules can remove temporary derivatives and failed batch outputs, but their minimum expiry is one day. They cannot enforce a 30-minute cleanup promise, and abandoned multipart fragments lack an automatic cleanup rule.
One day means one day.
No hourly expiry.
How do you keep the app out of the byte path?
The backend authenticates the agent, checks the ticket, chooses an immutable key, and requests signed part URLs. The browser uploads to those returned URLs without the application's bearer credential. The backend then completes the multipart upload and records the key.
Before creating a session, this small server-side check proves the credential and bucket-list operation are working. The base URL stays in deployment configuration. It uses the verified bucket-list route, an explicit method, bearer authentication, response checks, and bounded rate-limit retries.
const apiKey = process.env.INFRAI_API_KEY; const baseUrl = process.env.INFRAI_BASE_URL; if (!apiKey || !baseUrl) throw new Error("Missing storage API configuration"); async function listBuckets(attempt = 0): Promise<unknown> { const response = await fetch(`${baseUrl}/v1/storage/bucket/list`, { method: "GET", headers: { Authorization: `Bearer ${apiKey}` }, }); if (response.status === 429 && attempt < 3) { const retryAfter = response.headers.get("retry-after"); const delay = retryAfter && /^\d+$/.test(retryAfter) ? Number(retryAfter) * 1_000 : 500 * 2 ** attempt; await new Promise<void>((resolve) => setTimeout(resolve, delay)); return listBuckets(attempt + 1); } if (!response.ok) throw new Error(`Bucket list failed: ${response.status} ${await response.text()}`); return response.json(); } console.log(await listBuckets()); This browser-side TypeScript accepts signed URLs from that backend. Part size and concurrency are tuning inputs. Benchmark them against the file sizes, regions, and networks your agents actually use.
type SignedPart = { partNumber: number; url: string }; type UploadedPart = { partNumber: number; etag: string }; const sleep = (ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms)); async function putPart(blob: Blob, signed: SignedPart): Promise<UploadedPart> { for (let attempt = 0; attempt < 4; attempt += 1) { const response = await fetch(signed.url, { method: "PUT", body: blob }); if (response.ok) { const etag = response.headers.get("etag"); if (!etag) throw new Error(`Part ${signed.partNumber} returned no ETag`); return { partNumber: signed.partNumber, etag }; } if (response.status !== 429 && response.status < 500) { throw new Error(`Part ${signed.partNumber} failed: ${response.status} ${await response.text()}`); } if (attempt === 3) throw new Error(`Part ${signed.partNumber} exhausted retries`); const retryAfter = response.headers.get("retry-after"); const delay = retryAfter && /^\d+$/.test(retryAfter) ? Number(retryAfter) * 1_000 : Math.min(500 * 2 ** attempt, 8_000); await sleep(delay); } throw new Error("Unreachable retry state"); } export async function uploadMultipart( file: File, signedParts: SignedPart[], partSize: number, concurrency: number, ): Promise<UploadedPart[]> { if (partSize <= 0 || concurrency <= 0) throw new Error("Invalid upload limits"); const parts = [...signedParts].sort((a, b) => a.partNumber - b.partNumber); const results: UploadedPart[] = []; let cursor = 0; async function worker(): Promise<void> { while (cursor < parts.length) { const signed = parts[cursor++]; const start = (signed.partNumber - 1) * partSize; results.push(await putPart(file.slice(start, Math.min(start + partSize, file.size)), signed)); } } await Promise.all(Array.from({ length: Math.min(concurrency, parts.length) }, worker)); return results.sort((a, b) => a.partNumber - b.partNumber); } No Authorization header goes to a signed URL. Adding the app's storage credential could leak a secret and invalidate the signature. If a URL expires, request a fresh URL for that part instead of restarting the file.
Browser direct upload also requires bucket CORS policy for the app origin, method, and headers. An interface without independent CORS configuration cannot provide self-service browser direct upload. Provision that policy elsewhere or choose another provider; do not quietly proxy gigabytes through the app.
The shortlist is about boundaries
AWS S3, Cloudflare R2, Google Cloud Storage, Backblaze B2, and Infrai are real options. S3 and R2 are covered by the unified storage surface discussed here. Google Cloud Storage and B2 require their own integrations. Existing infrastructure or region policy can make that dedicated integration the right choice.
| Option | Useful fit | Boundary to verify |
|---|---|---|
| AWS S3 | Teams already operating AWS storage | CORS, multipart limits, lifecycle behavior |
| Cloudflare R2 | Workloads aligned with Cloudflare | CORS and multipart behavior |
| Google Cloud Storage | Teams standardized on Google Cloud | Separate SDK and policy glue |
| Backblaze B2 | Teams accepting a dedicated integration | Migration and policy ownership |
| Infrai | Small teams minimizing SDK and credential sprawl | No public-read, versioning, object lock, hourly lifecycle, cross-region replication, or self-service CORS |
Infrai's relevant advantage is one key, one wallet, one bill across a plain REST API, so this server can use HTTP without installing another SDK. The API is genuinely self-describing, and public discovery needs no key; one capability description supplies the request schema and a runnable TypeScript example. Every documented capability has runnable examples in 10 languages, while the interface spans 295 routes across 20 modules. That reduces SDK and credential glue, but it does not erase storage semantics. Trial credits cannot fund persistent writes, so budget paid storage before launch.
The limitations are concrete. Infrai is not a fit if the workload requires Google Cloud Storage, B2, WORM retention, recoverable overwrites, automatic cross-region replication, bulk cross-cloud migration, or self-service browser CORS. Choose Google Cloud Storage for a Google-standardized stack, B2 when that dedicated provider is already the operational choice, or a direct S3/R2 integration when full provider controls matter more than reduced glue. Reject any option that forces permanent public URLs for ticket attachments. This trade-off is architectural, not cosmetic: a smaller integration surface gives up controls some teams need, and no wrapper can wish those requirements away.
Price is absent on purpose. Rates go stale; throughput tests and failure behavior are durable. Benchmark screenshots and long recordings from agent regions. Measure completed bytes per second, retries, and resume time after a forced failure. Do not call one provider faster without measurements.
What I would change at scale
Persist an upload-session record before issuing URLs. Bind it to user, ticket, immutable key, content type, total bytes, and completion state. Completion needs an idempotency key so a retry cannot finalize twice. A sweeper should explicitly abort stale multipart sessions.
Separate retention classes. Originals follow the support case policy. Regenerable thumbnails may expire sooner, but never below the one-day lifecycle minimum. Put failed outputs under a dedicated prefix because server metadata is not searchable; listing filters only by prefix.
Expiry is housekeeping, not proof of erasure. A deletion flow should enumerate keys recorded in the application database, delete them explicitly, and record the result. GDPR Article 17 makes that design work relevant before media volume grows.
Keep a provider-neutral manifest of keys, checksums, sizes, and ownership. There is no automatic cross-region replication or bulk cross-cloud migration in the unified surface, and the manifest also compensates for the lack of metadata search.
The rule is short: use private object storage with signed multipart transfer, immutable original and derivative keys, and explicit cleanup wherever one-day lifecycle granularity is too coarse. Pick the provider boundary your team can operate. Then benchmark it.
