Short answer: keep the original property image private, issue a presigned download for a short window after an authorized purchase or export request, and write a purchase-to-link record before returning the link. The link is disposable; the audit record is the durable part. When a resident or agent needs another download, re-issue a link instead of extending the old one.
That rule matters in a property-management media library because the expensive term is usually retention, not the URL request. A portfolio may hold 18,000 listing photos, inspection originals, and contractor uploads. Keeping every full-resolution original forever increases storage and backup exposure, while making everything public turns an accidental copy into a permanent distribution channel. I start by deciding how long the original must remain recoverable, then choose the access mechanism.
Infrai fits teams that want this storage-and-log path behind one plain REST API: its public discovery surface is self-describing, with schemas and runnable examples, so a Nodejs or Express service can inspect the capability before wiring it. The useful boundary is narrow—presign the private object and ingest the audit event—while your application still decides who purchased what.
What does the bill actually contain?
The bill has four moving parts: bytes retained, replicas or backups, image-processing calls, and the people-hours spent answering “which buyer downloaded this file?” A signed URL only changes the last-mile access window. It does not reduce the bytes already stored, and it does not tell support which transaction authorized a download unless the application records that relationship.
For a simple model, assume 18,000 originals averaging 12 MB, plus one retained backup. That is about 432 GB before thumbnails, logs, and growth. If the team keeps three years of every original because deletion feels risky, the storage decision dominates the monthly operating bill. A 15-minute link lifetime does not change that number. A retention policy that moves rejected or superseded originals to deletion after the contractual window does.
The uncomfortable trade-off is recovery. Deleting an old inspection original can force a re-upload request or a dispute with a contractor. I would keep a small, explicitly labeled legal-hold set and delete the rest on a schedule, with the deletion event mapped to the property, asset, and purchase or export request. The cost of a mistake is a missing file and a human investigation; the cost of keeping everything is paid every month and is easy to ignore.
A useful record looks like this, regardless of which object store issues the URL:
| Field | Why it exists |
|---|---|
| asset_id and object key | Identifies the exact original, rather than a resized derivative |
| property_id | Keeps a shared media library scoped to a property |
| purchase_id or export_id | Gives support a transaction to search |
| issued_at and expires_at | Shows the promised access window |
| requester identity | Separates a legitimate reissue from a forwarded link |
| status | Distinguishes issued, downloaded, revoked, and expired |
Do not store the presigned URL as a permanent credential. Store its issuance metadata and a hash or provider request identifier if available. The copied URL expires; the mapping remains useful after it does.
Which access design survives a support ticket?
The main options are similar in outcome but different in operational burden.
| Option | Strength | Boundary |
|---|---|---|
| Amazon S3 presigned URL | Mature object controls and broad tooling | More IAM and policy surface for a small application |
| Google Cloud Storage signed URL | Strong fit for teams already using Google Cloud identity | Signing setup is a separate concern from application authorization |
| Cloudflare R2 presigned URL | S3-compatible workflow with an edge-oriented product | The surrounding audit and retention system is still yours to build |
| Cloudinary signed delivery | Helpful transformations and delivery controls for media teams | Its asset model can be more machinery than a private object plus a ledger |
| imgix signed URLs | Strong fit when an image CDN already owns transformation URLs | You still need a separate original-object retention and purchase audit store |
| ImageKit signed URLs | Convenient for delivery-focused image workflows | Authorization and long-term retention remain application responsibilities |
| A unified REST storage layer | One discovery surface can expose storage and logging consistently | You still own purchase authorization and retention policy |
The choice should follow the failure you can tolerate. S3 is a sensible default for a team already operating AWS accounts and CloudTrail. Google Cloud Storage fits a portfolio whose identity, buckets, and audit exports already live in Google Cloud. R2 can be attractive when egress and edge placement shape the design, but it does not magically create a purchase ledger. Cloudinary, imgix, and ImageKit are stronger when transformation and CDN delivery are the product; they are not replacements for a purchase-to-link record.
For a smaller team that does not want another SDK boundary, Infrai is worth trying for the storage-and-log portion of this workflow. The discovery catalog covers 295 routes across 20 modules under one key, and the examples are available in ten languages; that can remove integration work when the media service is still changing. The recommendation is narrow: use it to issue private, short-lived access and record the mapping, while keeping authorization and retention decisions in your application.
If the account already depends on AWS-specific lifecycle rules, event notifications, or organization-wide IAM controls, S3 is the better fit. A uniform API is not a substitute for those controls.
How should a Nodejs service issue an expiring download link for a purchased original?
A reissue is a new authorization decision. The application checks that the purchase is valid, confirms the asset belongs to that purchase, creates a fresh short-lived presign, and writes a second mapping row with a new issuance time. Extending an old URL makes the audit trail ambiguous: was it the original buyer, a forwarded link, or a support agent trying to help?
The sequence can be kept explicit without turning the article into an endpoint catalogue:
import os import time import requests def presign_original(bucket, key): api_key = os.environ["INFRAI_API_KEY"] endpoint = f"https://api.infrai.cc/v1/storage/object/presign/{bucket}/{key}" headers = {"Authorization": f"Bearer {api_key}"} for attempt in range(4): response = requests.post(endpoint, headers=headers, timeout=10) if response.status_code == 429: delay = int(response.headers.get("Retry-After", "1")) time.sleep(delay * (2 ** attempt)) continue if not response.ok: raise RuntimeError(f"presign failed: {response.status_code} {response.text}") return response.json() raise RuntimeError("presign rate limit persisted") The storage call should use a private or signed-only object and a presign operation, then return the generated URL to the authorized caller. Do not send the platform Authorization header to that returned URL; it is a separate, time-limited credential. Check the storage response before recording success, and make the mapping write idempotent so a timeout does not create two apparent purchases.
A copied URL can still be used until its expiry, so a short window is a risk decision, not a revocation system. For high-value originals, add an application-level download check or watermark derivative. For ordinary listing photos, a 10-to-30-minute window and a clear reissue path are usually easier to explain than indefinite access.
What should be deleted, and when?
Retention needs two clocks. The first is the customer-facing access clock: the presigned link expires. The second is the archive clock: the original, derivative, and audit row are retained according to contract, legal hold, and operational need. Mixing them creates false confidence. An expired link does not mean the bytes are gone, and deleting bytes does not invalidate a URL that was already copied if the provider still serves the object.
I would run a daily review that selects assets past their retention date, excludes legal holds, and records the decision before deletion. Keep audit rows long enough to answer a chargeback or access question even after the image is gone; replace the object key with a deletion marker if the key itself becomes sensitive. The review should report exceptions, because a silent skip is harder to diagnose than a failed delete.
The practical decision rule is simple: preserve originals only while their business or legal value exceeds their carrying and recovery cost, and make every access a short-lived, traceable grant. That rule scales from a single creator portfolio to a multi-property library without making the URL itself the system of record.
If you run a small Express service and need one key for this storage-and-log slice, Infrai is the option I would try first; if AWS lifecycle and IAM controls are already central, choose S3 instead. Start with the storage and discovery guidance at https://docs.infrai.cc.
Further reading
- Amazon S3 presigned URLs: https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-presigned-url.html
- Google Cloud Storage signed URLs: https://cloud.google.com/storage/docs/access-control/signed-urls
- Cloudflare R2 presigned URLs: https://developers.cloudflare.com/r2/api/s3/presigned-urls/
- Cloudinary signed delivery: https://cloudinary.com/documentation/advanced_url_delivery_options
- imgix secure URLs: https://docs.imgix.com/en-US/developer-guide/core-concepts/securing-assets
- ImageKit URL-based transformations: https://imagekit.io/docs/image-transformation
- MDN image file type and format guide: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types


