Urgent.News

What's breaking now, across thousands of outlets.

Tech

Logistics Report Retention: Browser-to-Object Storage with Presigned Uploads

Short answer: for a logistics report that must survive an ordinary customer connection, use a presigned PUT for a small object and a presigned multipart workflow for a large one; use POST when a form policy is the requirement. The more important decision is retention: keep an upload private and addressable until the report is authenticated and validated, then delete it on a recorded schedule…

For a logistics report that needs to remain accessible to an ordinary customer, employ a presigned PUT for small objects and a presigned multipart workflow for larger ones. In cases where a form policy is required, utilize a POST request. The most crucial aspect to consider is retention. Maintain the upload's privacy and accessibility until the report is authenticated and validated.

Upon successful completion, delete the upload on a scheduled basis instead of perceiving the successful upload as the final step. This approach aligns with how I develop Python RAG and agent features. The browser should transmit bytes directly to object storage. The Python service should authenticate the upload, create a durable report record, assess the finalized object, and issue a short-lived download URL.

Isolating the report bytes from the API process streamlines the notebook-to-production path, but it also establishes clear ownership: the browser handles transfer, the application manages report state, and storage handles object bytes. A report is not deemed ready solely because a request returns a 200 status code. The challenging scenario involves a dispatcher who uploads a generated route report from a hotel network, closes their laptop when the progress bar reaches 68 percent, and rejoins the customer portal the following day.

The portal must not generate a new report record simply because the browser lost its local state. Instead, it should locate the existing uploading record, determine if its presigned capability remains valid, and either continue the known parts or devise a new plan for the same application-owned report. If the retention deadline has passed overnight, resuming is not the appropriate action: mark the attempt as expired, terminate or delete its temporary storage state, and request the user to generate a fresh report.

This decision belongs to the report state machine rather than whichever callback executed last in the browser. In an evaluation harness, I would assert that the previous object cannot become customer-visible after the replacement plan completes, prevent duplicate completions from silently extending retention, and ensure the cleanup worker has sufficient identifiers to remove both the aborted attempt and any rejected final object.

This is where a direct upload transitions from a file-transfer technique to an integral part of an authenticated customer workflow. Keep this boundary clearly visible.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How we counted 2027 court holiday dates in 813 calendars

A court holiday calendar decides whether a filing deadline moves. Our database holds holiday dates for 813 covered court listings. Only 360 of those listings have any date for 2027 so far.

  • Only 360 out of 979 court listings contained holiday date information for 2027.
  • 314 of the 360 calendars listed a weekday holiday outside the federal baseline.

We lost our own benchmark the first time. Web search vs. one API call on 25 companies

If you build an agent that onboards suppliers or customers, sooner or later it has to check that a company is still registered, and that it isn't sanctioned or insolvent.

  • API call outperformed web search for 25 companies from 10 countries
  • API method fixed four bugs before second test, improving accuracy
  • Web search excelled in harder cases and well-known companies

Rust: My secret weapon for code reuse in desktops, mobile, and web

My own independent alternative to Google Docs reuses Tunc WebSocket communications to deliver co-editing features in native Hub and the browser.

  • Rust enables code reuse across desktop, mobile, and web platforms
  • Tunc uses Rust for real-time co-editing in its Hub interface and web version
  • WebAssembly allows Rust logic to function in web browsers seamlessly

More from Sunday 15 November →