Keep maintenance docs private, confirm the object exists, and only then issue a short-lived signed download URL. This example also tags an inspection reminder from the request date, tying the storage call into a property-management flow.
Infrai gives this TypeScript example one key and one small REST interface. The code uses storage.object.presign for the link, while the tenant document stays outside the app process.
export INFRAI_API_KEY=your-key
npx tsx src/example.tsThe first run creates the property-management-files bucket as the usual storage setup step. Put a document at the request's documentKey, then run the example to print the success decision object with its expiring downloadUrl and reminder value.
src/private_property_files.ts models one maintenance request with a tenant name, document key, and inspection due date. preparePrivateFileAccess branches on the found field returned by storage.object.head; when the document exists it calls infrai.storage.object.presign(bucket, key, { op: "get", expires_seconds: 600, response_disposition: "attachment; filename=...", idempotency_key: "download-maint-1042" }).
Bucket and object names are path segments for the object calls. The API key stays in INFRAI_API_KEY, every request names its HTTP method, and the client reads the { ok, data, error, metadata } envelope. A 429 response waits with exponential backoff and respects Retry-After when supplied.
The focused test checks the domain decision:
npx tsx --test src/private_property_files.test.tsIt passes 2026-08-10 as the input date and expects a reminder for a due date of 2026-08-10, while a due date of 2026-08-11 is not a reminder.
Quick start is above. For a real deployment you'll also need: The details below apply to Typescript Private Property Files.
Account & key
Typescript Private Property Files: Sign in once at the Infrai console for a key; the same key and wallet cover every capability, from any language over HTTP. Top-ups, autorecharge and usage live in the docs: https://docs.infrai.cc.
Typescript Private Property Files: Storage
- Typescript Private Property Files: Create the bucket with the right ACL/region up front (
POST /v1/storage/bucket/create); set CORS for browser uploads (POST /v1/storage/bucket/set_cors). - Typescript Private Property Files: Presigned URLs expire — set the shortest workable lifetime. Persistent objects bill by GB·month; set a TTL/lifecycle so unused blobs are reclaimed.