GROW WITH ATARAXYBuild skills. Get real experience.Explore internships and education support.

MVPs & SaaS Projects

SaaS Presigned Uploads: Bind Each URL to a File Intent and Verify the Result

Design presigned upload workflows around authorized file intents, controlled object keys, limited URL exposure, verified storage results, and a separate acceptance decision.

LET’S BUILD SOMETHING USEFUL

Have a project in mind?

Talk to ATARAXY DEVELOPERS (SMC-PRIVATE) LIMITED about your website, app, or custom software.

A presigned upload URL lets a browser send a file directly to object storage, but it does not complete the application’s acceptance workflow. The user may upload the wrong file, abandon the transfer, or retry after the application has changed state. If the product treats a client-side success message as proof that the right document is ready, it can attach incomplete, unexpected, or mutable content to a trusted record.

Imagine a SaaS application that accepts a supplier certificate for review. The user first identifies the supplier and document purpose, then chooses a file. A dependable design records that intent before issuing upload access and verifies the stored result before making the certificate available. The URL is one temporary capability within that process. The application remains responsible for deciding what was requested, what arrived, and whether it may now be used.

Create an authorized file intent first

Store an intent identifier, tenant, submitting user, target record, document purpose, expected constraints, and current state. Confirm that the actor may add that kind of file to the target record. Use a server-generated object key that is bound to the intent rather than accepting an arbitrary destination supplied by the browser. Keep the original filename as display metadata instead of using it as the storage authority.

For the supplier example, the intent should identify the supplier record and the certificate request it answers. If the supplier changes while the upload panel remains open, do not silently reuse the old intent for the new selection. Either retain the original association visibly or require a new authorized intent. This prevents a technically successful transfer from becoming evidence attached to the wrong business entity.

Treat the URL as a temporary bearer capability

The Amazon S3 presigned URL documentation describes these URLs as bearer tokens whose capabilities are limited by the permissions of their creator. It also states that a URL can be used repeatedly until it expires and that an upload to an existing object key replaces that object. Do not describe an ordinary presigned URL as inherently single use.

Choose an expiry appropriate to the expected transfer and the product’s recovery flow. Avoid placing complete signed URLs in analytics events, support tickets, screenshots, or routine logs. Record the intent identifier and a safe error category instead. If a user needs another attempt, recheck the current authorization and intent state before issuing replacement access; do not let an old browser screen mint new upload capabilities indefinitely.

Separate upload progress from business acceptance

Use states that distinguish an issued upload opportunity, an observed stored object, processing, accepted content, rejection, and expiry. A browser callback can request finalization, but the server should inspect the expected storage location and validate the result. Confirm the key, applicable size constraints, and other properties required by the file policy. Where an exact content checksum is part of the design, define how it is obtained and verified.

Do not trust a client-provided MIME type as proof of the actual file format. Apply the content inspection and processing required for the document’s intended use. Keep the file unavailable through ordinary customer download routes while those checks are pending. The interface can honestly say that transfer finished and review is in progress without claiming the certificate has already been accepted by the application.

Prevent later uploads from changing accepted evidence

Repeated use of an unexpired URL creates a particular design risk: the object at its key can change after the application has checked it. Marking an intent accepted in the application database does not, by itself, make that storage URL unusable. Choose a storage design that preserves the exact content accepted, such as binding acceptance to a specific verified object version or promoting verified bytes into a controlled destination.

Review the race between inspection and acceptance. The identifier used for the accepted file must refer to the same content that passed the checks. If the implementation reads the latest object again during promotion, an intervening replacement can undermine the earlier verification. Test a second upload while inspection is running and after acceptance. The accepted certificate should remain tied to the reviewed content, with later attempts producing a defined outcome.

Make finalization safe to repeat

The browser may lose the response after the server records acceptance. A retry should return the existing result for the same intent rather than create a second attachment. Use the intent’s stable identity and enforce the permitted state transitions. If two finalization requests arrive together, they should converge on one accepted record or one clear rejection, not two separately billable or separately reviewed documents.

Keep uncertainty visible. If storage inspection is temporarily unavailable, the correct state may be pending verification rather than failed upload. Provide a status endpoint or refresh route so the user can recover without sending the file again unnecessarily. Distinguish an expired unused intent from one whose bytes arrived but still require processing. Those situations need different cleanup and customer guidance.

Reconcile abandoned files and changed permissions

Some intents will never receive a file, while others will receive data without a finalization callback. Run a scoped reconciliation process that compares intent records with their expected objects and ages. Define when an abandoned upload becomes eligible for removal, and coordinate that policy with active processing. Cleanup should not delete a file simply because the browser closed while server-side verification was still progressing.

Recheck relevant permissions when the file is accepted or accessed. A user may lose access to the supplier while a transfer is in progress. Decide how the workflow handles that change and preserve an audit record of the outcome. Keep download authorization separate from upload authorization; receiving permission to submit a certificate does not necessarily grant permission to read every document associated with that supplier.

Test the content and coordination failures together

Use fixtures for an allowed file, an oversized file, an unexpected format, an empty object, a repeated upload, and a mismatched target record. Interrupt the browser after transfer and during finalization. Simulate delayed storage inspection and a permission change. Verify the attachment list, processing status, and stored content identity after each case, including what a second user in the same organization can see.

AI can help extract a certificate’s visible dates or suggest a document category after safe processing, but its output is not proof that the document is authentic or acceptable. Retain the source reference and make uncertain extraction reviewable. Never allow instructions inside the uploaded file to determine storage destinations or acceptance rules. Those decisions should come from the application’s authorized workflow and reviewed policy.

Conclusion

Presigned uploads work well when they are bound to a clear file intent and followed by server-side verification. Control the destination, limit URL exposure, and separate transfer success from acceptance. Preserve the exact content that passed review, make finalization repeatable, and reconcile abandoned work. These decisions let direct-to-storage uploads improve the experience without weakening the meaning of an accepted document.

LET’S BUILD SOMETHING USEFUL

Turn what you’ve learned into your next project.

Talk to ATARAXY DEVELOPERS (SMC-PRIVATE) LIMITED about your website, app, or custom software.

ATARAXY DEVELOPERS (SMC-PRIVATE) LIMITED — Turning Digital Visions Into Reality

ATARAXY DEVELOPERS (SMC-PRIVATE) LIMITED builds websites, mobile apps and custom software for businesses in the US, Pakistan and beyond.

Join Our Newsletter

Get insights on software, digital products and automation from our development team.

You have been successfully Subscribed! Ops! Something went wrong, please try again.