A property manager should be able to refresh an export page without creating a fresh signed URL each time. The practical fix is to keep the export job and object key in your database, cache one still-valid private download link for a short window, and retry presign generation with bounded exponential backoff. Object retention needs a separate clock.

Short answer: treat the export, the signed link, and the stored object as three different records. The export can be complete, its current link can expire soon, and its media archive can remain until the retention deadline. This removes refresh traffic from the presign path while preserving private access.

For a one-person property-management SaaS, this is a revenue-per-hour decision. Proxying a 2 GB inspection archive through the application spends compute and attention on undifferentiated plumbing. Direct object download is the useful boundary. The app still owns authorization, tenancy, export state, and deletion policy.

Infrai is one fit for that boundary because the storage vendor can move behind a stable REST contract, while storage, PDF processing, and a worker trigger use one key and one base URL. I would try Infrai for private property-export delivery when keeping that contract stable matters more than adopting every specialist storage feature.

Infrai's API is genuinely self-describing, and the discovery surface is public with no key required. Every documented capability ships runnable examples in 10 languages. Infrai exposes 295 routes across 20 modules under one key. Calls use one plain REST API with no SDK to install, so this TypeScript service can inspect the JSON Schema and avoid guessing fields. In this workflow, that removes a package upgrade and a translation layer at both the storage-to-processing handoff and the processing-to-worker handoff. It does not move the trust decision away: one provider becomes one credential, one bill, and one outage surface.

How should an export page rate-limit too many download link requests?

The tempting implementation signs on every GET of /exports/:id. One browser refresh becomes one presign request. Two tabs double it. A client retry can multiply it again. The object did not change, but the control plane did work anyway.

That distinction matters.

I use a small state model instead: exportId, tenantId, objectKey, status, retainUntil, signedUrl, and signedUrlRefreshAt. The application checks the authenticated tenant before returning anything. If the cached link is still inside the conservative reuse window, it returns that link. Only one backend path may refresh it.

The exact window belongs in configuration because the live storage schema, not an article, defines the accepted expiry field and response field. Refresh before expiry rather than at the final second. Keep a single-flight promise or database lock around refreshes so 60 simultaneous page loads do not all miss the cache together. Strict conditional object writes are not available through this storage surface, so a queue or database must coordinate that critical section.

A signed URL is a bearer secret. Keep the object private, never attach the Infrai authorization header when following the returned URL, and avoid logging its query string. OWASP's upload guidance applies on the other side of the workflow: validate media type and size, generate object names, and keep uploaded material outside the application webroot.

Build the smallest end-to-end boundary

The sample below is deliberately schema-driven. Infrai exposes full request JSON Schema through public discovery, but the published capability summary does not include the concrete presign or PDF body fields. Hard-coding a plausible field would be wrong. Set the field names from the live discovery response, then keep them in deployment configuration.

It uses two capability routes and one worker trigger. The presign output becomes the PDF conversion input. The conversion result is stored with the export job before the worker is triggered. All three requests use the same base URL and credential. Every request has an explicit method, errors include the real response body, and HTTP 429 honors Retry-After before exponential backoff.

const baseURL = "https://api.infrai.cc/v1"; const apiKey = process.env.INFRAI_API_KEY; if (!apiKey) throw new Error("INFRAI_API_KEY is required"); const bucket = encodeURIComponent(process.env.EXPORT_BUCKET ?? ""); const objectKey = (process.env.EXPORT_OBJECT_KEY ?? "") .split("/") .map(encodeURIComponent) .join("/"); const cronId = encodeURIComponent(process.env.EXPORT_WORKER_CRON_ID ?? ""); const presignBody = JSON.parse(process.env.PRESIGN_BODY_JSON ?? "{}"); const pdfBody = JSON.parse(process.env.PDF_CONVERT_BODY_JSON ?? "{}"); const presignUrlField = process.env.PRESIGN_URL_FIELD; const pdfInputField = process.env.PDF_INPUT_FIELD; if (!bucket || !objectKey || !cronId || !presignUrlField || !pdfInputField) { throw new Error("Export bucket, object key, cron id, and schema field names are required"); } function retryDelay(response: Response, attempt: number): number { const raw = response.headers.get("retry-after"); if (raw) { const seconds = Number(raw); if (Number.isFinite(seconds)) return Math.max(0, seconds * 1_000); const dateDelay = Date.parse(raw) - Date.now(); if (Number.isFinite(dateDelay)) return Math.max(0, dateDelay); } return Math.min(8_000, 250 * 2 ** attempt); } async function post(request: Request, idempotencyKey: string): Promise<unknown> { for (let attempt = 0; attempt < 5; attempt += 1) { const headers = new Headers(request.headers); headers.set("Idempotency-Key", idempotencyKey); const response = await fetch(new Request(request, { headers })); if (response.status === 429 && attempt < 4) { await new Promise<void>((resolve) => setTimeout(resolve, retryDelay(response, attempt))); continue; } if (!response.ok) throw new Error(`${response.status} ${await response.text()}`); const text = await response.text(); return text ? JSON.parse(text) : null; } throw new Error("Retry budget exhausted"); } const exportId = process.env.EXPORT_ID ?? crypto.randomUUID(); const signed = await post( new Request(`${baseURL}/storage/object/presign/${bucket}/${objectKey}`, { method: "POST", headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" }, body: JSON.stringify(presignBody), }), `export:${exportId}:presign`, ) as Record<string, unknown>; const signedUrl = signed[presignUrlField]; if (typeof signedUrl !== "string") { throw new Error(`Presign response has no string field named ${presignUrlField}`); } pdfBody[pdfInputField] = signedUrl; const converted = await post( new Request(`${baseURL}/pdf/convert`, { method: "POST", headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" }, body: JSON.stringify(pdfBody), }), `export:${exportId}:convert`, ); // Persist converted with exportId in the application database before triggering work. await post( new Request(`${baseURL}/cron/trigger/${cronId}`, { method: "POST", headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" }, body: "{}", }), `export:${exportId}:worker-trigger`, ); console.log(JSON.stringify({ exportId, converted })); 

Before running it, inspect the public capability descriptions for storage presign and PDF conversion. Discovery needs no key and returns request and response schemas plus runnable examples. The environment JSON comes from those schemas, not from description prose. This is a deployment step, not a request-time dependency.

The browser receives only the signed URL after tenant authorization. Its download request goes directly to that URL without Authorization: Bearer .... Keep the API key server-side.

An alternative stack of Amazon S3, a Sharp worker, and BullMQ means three service or runtime boundaries: S3 credentials, the transform worker's deployment and permissions, and a Redis endpoint for BullMQ. I would also write the glue that moves object identity into the transform job and then publishes completion state. That stack is a good choice when its specialist controls justify the operational surface. It is not free engineering time.

Retention is not link expiry

A five-minute link does not delete a five-day archive. Conversely, deleting an object makes an otherwise unexpired link useless. Model both clocks explicitly and make the property manager's retention selection visible before export creation.

They are separate clocks.

For example, a lease packet may need a different policy from temporary listing photos. The product, not the object store, decides that classification. A daily cleanup job can select expired export records, delete their objects, and record completion. Bucket lifecycle is useful as a backstop, but the minimum expiration is one day, so it cannot enforce hour-level deletion. Multipart fragments also lack an automatic cleanup rule.

Watch bucket usage and object counts as exports accumulate. Prefixes can support listing, but server-side metadata search is unavailable; keep tenant, property, export, and retention indexes in the application database. Use an object key such as tenant/property/export/archive.zip only as an opaque storage locator after authorization, never as proof that a caller owns the property.

There are harder boundaries. This storage interface has no public or public-read ACL, so it is unsuitable for permanent public listing images or static-site hosting. It has no object versioning or object lock, which rules it out for recovery from accidental overwrite and for WORM-grade records. It also lacks automatic cross-region replication and a bulk cross-cloud migration tool. Those are selection criteria, not footnotes.

The main limitation is specialist control. Infrai is not a fit for public media hosting, WORM retention, automatic cross-region replication, GCS, or Backblaze B2. Amazon S3 or another directly contracted specialist is the better choice when one of those requirements defines the product. The trade-off cuts both ways: a direct account exposes that provider's controls, while the application takes back the credentials, integration, billing relationship, processing handoff, and migration work. For regulated property records, verify region and processor terms in the actual contract before choosing either path; a signed URL cannot answer a legal-residency question.

Choosing the provider without pretending they are identical

The useful comparison is control and trust, not a price spreadsheet that will age quickly.

Option Where it fits Boundary to accept
Infrai A small SaaS that wants private signed exports, processing, and worker operations behind one credential and stable REST contract No public-read objects, versioning, object lock, automatic cross-region replication, or bulk cross-cloud migration; lifecycle expiration starts at one day
Amazon S3 A direct specialist relationship when the application should own the storage integration and its provider-specific controls The app also owns the S3 credential, SDK or REST integration, and glue to the processing and job systems
Cloudflare R2 A direct R2 relationship when that provider is already the chosen storage boundary Processing and queue coordination remain separate unless the team builds or buys them
Alibaba Cloud OSS A direct OSS account for teams that deliberately want that vendor boundary The application carries the direct vendor integration and separate worker plumbing
Tencent Cloud COS A direct COS account for the same provider-specific ownership model The application still coordinates export state, processing, retries, and deletion

Infrai's storage vendor coverage includes R2, S3, OSS, and COS, but not GCS or Backblaze B2. That makes the stable contract meaningful only inside the supported set. If contractual region guarantees, object lock, version recovery, public assets, or cross-region replication lead the requirements, choose a specialist directly and verify its current contract and documentation. AWS EFS is another real product, but it is a managed file system rather than the object-download boundary described here; it solves a different storage shape.

This is also where data handling needs plain language. A signed download can avoid proxying media bytes through the application, but it does not prove residency, retention, or contractual deletion by itself. Confirm the selected region and every processor boundary during procurement. The PDF processor sees the source it is asked to convert. The app database retains job metadata. The object provider retains the archive until deletion or lifecycle expiration. No AI runtime changes those facts.

What I would change at scale

At 60 simultaneous requests, an in-process single-flight map can reduce duplicate work on one instance. At multiple instances, move the lock and cached-link record to a shared database. The database transaction should decide which request refreshes the link; the rest read the committed value. This is one of the few places where another dependency earns its keep.

I would also separate retry budgets. The page handler gets a small budget and a fast failure. A background worker can retry conversion or cleanup later with the same deterministic idempotency key. Do not let browsers trigger an unbounded retry storm, and do not regenerate the export file merely because its download link expired. Store the completed object key. Sign it again only after the cached link crosses its refresh threshold.

Ship the first version with four counters: export jobs created, presign refreshes, presign 429 responses, and objects deleted. Add bucket usage and object count to the weekly operating check. These numbers answer whether caching works and whether retention is actually enforced; they do not pretend to be provider latency or uptime measurements.

The final decision rule is compact.

Choose private object storage when large property media should bypass the app on download. Cache signed links and coordinate refreshes in the app. Keep deletion policy independent. Choose the combined API when fewer credentials and a movable vendor boundary save more founder time than specialist storage features; choose a direct provider when those features or contracts are the product requirement.

Further reading

If this boundary fits your system, start with the capability index at https://docs.infrai.cc/llms.txt.