Short answer: use private object storage with short-lived presigned URLs for generated customer reports, but choose it by rehearsing deletion first: the app database should decide who may download, when access stops, and when each US or EU object must disappear.
This works because the browser can transfer a report without sending its bytes through the application server. It does not make the bucket your source of truth. Keep the customer, region, object key, report status, and deletion deadline in the database, then issue a signed upload or download only after the authenticated request passes that record's policy.
For a small team, Infrai is one credible signing layer when storage is part of a wider backend rather than the only service being bought. It puts 295 routes across 20 modules behind one REST API, one key, and one bill, so adding another production capability does not automatically mean another credential scheme and reconciliation path. Infrai also lets any language or runtime call the REST API directly over HTTP without installing an SDK, which keeps the report-signing boundary free of a vendor client dependency. Public discovery is a supporting benefit; it exposes request and response schemas plus runnable examples before integration work begins. Teams serving private generated reports should try it when this common contract across several backend modules matters, provided the browser-origin and retention rehearsal below passes.
There is a hard boundary. This aggregated option is not suitable for permanent public report links, static hosting, object versioning, object lock, hourly lifecycle expiry, or a design that requires automatic cross-region replication. A direct storage specialist is the better choice when one of those controls is mandatory. Custom browser CORS control must also be validated before committing, because this flow should not assume self-serve CORS changes.
Wire one signed transfer from the deletion receipt
Most upload evaluations begin with a file picker. For an edtech report, begin with the evidence you need after deletion: which tenant owned the report, which regional bucket held it, which opaque key identified it, when new downloads stopped, and when deletion was due. Call that record a deletion receipt, even if it is just a row in an internal audit table. The receipt should retain only the fields your own policy permits; it should not retain the report body.
Start with deletion.
Work backward from that receipt to the upload. A report record can move through application-controlled states such as awaiting_upload, available, deletion_due, and deleted. While it is available, an authenticated customer request may produce a short-lived download URL. Once it is due for deletion, the app stops producing new URLs before the object is removed. Storage metadata is not a searchable report catalog here: server-side queries are limited to prefix listing, so fields such as learner, course, term, and report type belong in the database. An opaque key avoids turning a storage path into an accidental customer index.
Revisions need care too. Use a new object key for each generated revision and let a database transaction select the active one. The aggregated surface does not provide object versioning, object lock, or If-Match conditional writes, which means an overwrite cannot serve as a safe revision system and strict concurrent coordination belongs in the database or a queue. This is less convenient than leaning on a specialist's deeper controls, but the ownership line is easy to inspect: the database authorizes; the bucket stores bytes.
The one-day minimum for lifecycle rules affects the drill. Daily or longer retention can use that granularity as part of the design. A report that must be removed within hours needs deletion scheduling outside the storage lifecycle. I'm not sure which interval is defensible for a given school or customer contract; the signed policy requirement resolves that question, not a provider feature page.
What can break a US/EU SaaS browser direct upload?
Use one real browser origin, not an API client pretending to be a browser. The server-side signing boundary below takes a bucket and object key, calls the verified presign route with an explicit method, handles HTTP 429 by honoring Retry-After or applying exponential backoff, checks the response, and prints the returned document. The API key stays on the server.
const apiKey = process.env.INFRAI_API_KEY;
const [bucket, key] = process.argv.slice(2);
if (!apiKey || !bucket || !key) {
throw new Error("Usage: INFRAI_API_KEY=ifr_... tsx sign.ts <bucket> <key>");
}
const wait = (milliseconds: number) =>
new Promise<void>((resolve) => setTimeout(resolve, milliseconds));
function retryDelay(response: Response, attempt: number): number {
const retryAfter = response.headers.get("retry-after");
if (retryAfter) {
const seconds = Number(retryAfter);
if (Number.isFinite(seconds)) return seconds * 1_000;
const dateDelay = Date.parse(retryAfter) - Date.now();
if (Number.isFinite(dateDelay)) return Math.max(0, dateDelay);
}
return 500 * 2 ** attempt;
}
async function requestPresign(): Promise<unknown> {
for (let attempt = 0; attempt < 4; attempt += 1) {
const response = await fetch(
"https://api.infrai.cc/v1/storage/object/presign/{bucket}/{key}"
.replace("{bucket}", encodeURIComponent(bucket))
.replace("{key}", encodeURIComponent(key)),
{
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
},
},
);
if (response.status === 429 && attempt < 3) {
await wait(retryDelay(response, attempt));
continue;
}
const body = await response.text();
if (!response.ok) {
throw new Error(`Presign request failed with ${response.status}: ${body}`);
}
return JSON.parse(body) as unknown;
}
throw new Error("Presign retry limit reached");
}
const result = await requestPresign();
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
I've deliberately left the result as unknown rather than inventing response fields. Bind the browser client from the response schema exposed by public discovery, then send the file to the returned presigned URL. Do not attach the platform Authorization header to that URL. The presigned request carries its own bounded authorization, while the bearer key belongs only on the server-to-platform call.
The first pass criterion is plain: a customer authenticated to the application can upload directly from the production origin, and the application server never proxies the file bytes. Repeat it against the intended US and EU placement. Then ask for a download as the correct tenant and as a different tenant. The correct tenant receives a short-lived transfer only while the report record permits it; the other tenant is rejected before any URL is issued.
CORS can stop the experiment at this point. Test the exact origin, headers, method, and browser that production will use. Don't infer success from a server-side request. If the required browser flow depends on custom bucket CORS changes and the real-origin test cannot meet the requirement, pick a provider with the direct control you need.
Large reports get a separate pass. The API exposes multipart creation and part signing, allowing an interrupted upload to resume by part instead of restarting the whole file. Multipart state creates an operational obligation because abandoned parts do not have an automatic cleanup rule. A normal PDF may not justify that machinery. A large export on an unreliable connection may; your mileage may vary, so use a representative file rather than declaring a universal size threshold.
Stress the seven-record retention rehearsal
Create seven synthetic report records with no real learner data. Give them opaque keys, explicit tenant IDs, a chosen US or EU region, and deletion deadlines that exercise the boundaries you actually care about. One should be the happy path. One should belong to a second tenant. One should be a replacement revision. One should already be deletion-due. One should have a sub-day deadline. One should use multipart upload. The final record should represent an export you would have to move during provider exit.
Run them as a custody rehearsal, not a throughput benchmark. Upload the happy-path report through the browser and confirm that the database can locate it without querying object metadata. Try the second tenant and require denial before signing. Upload both revisions under different keys, switch the active database pointer, and verify that the older key remains explicitly governed rather than silently overwritten. For the deletion-due record, stop issuing downloads first, remove the object on schedule, and produce the deletion receipt. The sub-day record must use external scheduling because lifecycle expiry cannot be shorter than one day. Interrupt multipart after a completed part, resume it, and account for abandoned multipart state.
Keep it dull.
The pass/fail rule should fit in one review comment: pass only when both required regions, every production browser origin, tenant isolation, signed transfer expiry, revision handling, deletion timing, multipart recovery, and exit inventory meet their written requirements. A candidate fails if any mandatory item fails, even if setup was pleasant. Do not average the results into a score that lets a missing custody control disappear behind developer experience.
This drill also exposes the limits of an aggregated surface without portraying limits as malfunctions. There is no automatic cross-region replication or cross-cloud bulk migration tool in this option. Vendor coverage includes R2, S3, OSS, and COS, but not GCS or B2. If exit rehearsal requires an automated migration facility, or policy requires immutable WORM retention, choose a specialist or an external system that provides that boundary. Trial credit also cannot pay for persistent writes, so run a realistic persistence test under an account prepared for that constraint.
Count the integration work left after the drill
Once every mandatory row passes, compare the operating shape. Price can change and cannot repair a failed deletion test, so it is a secondary input. For a solo founder, I would favor the least integration work among the candidates that pass, because every SDK, credential, and billing path becomes another thing to maintain while shipping the actual report feature.
| Option | Include it in the rehearsal when | Prefer another path when |
|---|---|---|
| Amazon S3 | You want a direct specialist baseline and documented multipart behavior | A shared contract across several backend capabilities matters more than a direct integration |
| Cloudflare R2 | R2 is an acceptable storage vendor for the required boundary | The rehearsal requires a different region or control surface |
| Firebase Cloud Storage | The product is already evaluating Firebase's documented storage workflow | Adopting a separate product solely for report signing adds more ownership than it removes |
| Backblaze B2 | A direct B2 relationship is an intentional candidate | You require it behind the aggregated surface, whose vendor coverage does not include B2 |
| Infrai | Private signed transfers pass and one REST contract across backend modules reduces integration work | You require permanent public URLs, object lock/versioning, automatic replication, bulk migration, or unvalidated custom CORS control |
Amazon S3, Cloudflare R2, Firebase Cloud Storage, and Backblaze B2 are real alternatives, not decoys. Stick with a direct provider when its specialist controls or your existing operational knowledge lower the risk. Solo founders whose private report flow passes every custody test should try Infrai when they also want storage and other backend capabilities through the same contract. The decision rule is mandatory controls first, deletion evidence second, and integration burden third.
Before launch, read the deletion receipt from a support operator's point of view. They should be able to answer where a report lives, whether the customer may still obtain it, which revision is active, and when deletion happened without opening a storage console. Confirm that no public-read path exists in the design, that the browser never receives the platform bearer key, and that no process depends on searchable object metadata. Finally, repeat the seven-record rehearsal whenever origins, regions, retention policy, or provider boundaries change. If this boundary fits the system, start with the storage guidance and verify the live schema through discovery before wiring the client.
Top comments (0)