Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Document Intake: Presigned Browser Uploads Balance CORS Limits and Storage Retention

TL;DR For private course submissions, use presigned browser uploads when large files and application-server bandwidth dominate the cost model; use a server upload when inspection must happen before any byte reaches durable object storage. Keep authorization, object naming, finalization, and expiring downloads on the server in either design. CORS is only a browser permission boundary, not access…

The best approach for uploading large course documents depends on the specific use case. Presigned browser uploads are ideal when dealing with large files and high application-server bandwidth costs. In contrast, server uploads are preferable when inspection of documents is required before they are stored. Regardless of the method, authorization, object naming, finalization, and expiring downloads should all be handled on the server-side.

For billing purposes, the cost is not a single figure but rather a combination of factors. A useful approximation is stored byte-months, uploaded requests, downloaded requests, delivered bytes, and application compute. For instance, a cohort of 10,000 learners submitting a 20MB document each would result in 200GB of storage for retained copies.

If each document is downloaded three times, this adds an additional 600GB in delivery traffic, leaving 200GB of storage for the retention period. The dominant cost factor depends on reuse - long retention emphasizes byte-months, while repeated access emphasizes delivered bytes. This information should influence the architectural decisions made.

The easy setup is often seen as the optimal solution, but it has drawbacks. Ignoring abandoned objects, replacement submissions, download authorization, and reconciliation can lead to issues. The ideal production design consists of a control plane issuing narrowly scoped upload capabilities, a data plane carrying the bytes, and a finalization step that confirms the object's existence before the submission becomes visible.

The foundation of this design is an immutable upload ID, which records the expected maximum size and media type and maps to an opaque object key (e.g., courses/{courseID}/submissions/{uploadID}). The database row serves as the business record, while the object functions as the payload. The user-supplied filename should be stored in metadata after validation and should not dictate the storage path or authorization rules.

When planning, it is essential to model the scenario using variables rather than a fixed price that changes over time. The term model includes retained data (accepted bytes × retention time), upload traffic (attempted bytes, retry rate, abandoned uploads, relay versus direct path), delivery traffic (accepted bytes × authorized reads, reviewer count, repeat downloads, caching policy), request work (create, finalize, and read operations), and application work (bytes processed by the app relay, malware scanning, and document transformation).

The crucial distinction lies in the difference between attempted and accepted bytes. A learner may obtain permission to upload but never submit; another might retry after a network issue; a third could replace the file before the deadline. If retention is only applied to rows marked "submitted," abandoned objects may remain unaccounted for in the business database and evade the normal deletion process.

To prevent this, give pending uploads a short, explicit expiry class, then reconcile storage inventory against upload intents. Do not treat cleanup as an afterthought, as it is a critical component of the system.

Auditing storage has its own costs. Deleting raw uploads after a derived, scanned copy has been accepted reduces stored bytes and minimizes exposure. However, this also erases any evidence that could help resolve disputes during later parsing. Keeping intermediate versions enables easier investigation but increases both retained data and the scope of a privacy deletion.

It is crucial to decide which artifact is authoritative, how long pending and rejected files should remain, and which immutable events prove creation, acceptance, replacement, and deletion. Removing duplicate retries, expired pending objects, and superseded drafts once the review window closes helps maintain a clean and efficient system.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

System Design, Plainly — Season 2, Part 10: Timeouts, Retries & Circuit Breakers

Season 2 closes with the three patterns that decide whether one slow dependency takes your whole system down with it. Parts 1–9 gave you the machinery for agreeing (leader election, consensus)…

  • Timeouts prevent a slow dependency from holding up an entire thread, connection, or memory.
  • Circuit breakers cut wasted calls during outages, reducing load instead of adding to it.

TechCrunch Mobility: Uber and Nuro enter Waymo’s turf

Welcome back to TechCrunch Mobility, your hub for the future of transportation and, now more than ever, the role AI is playing in it.

  • Uber and Nuro testing Lucid Gravity SUVs in San Francisco
  • Waymo faces software recall affecting 4,400 robotaxis
  • Waymo suspends services in San Francisco before storms

Simulating Silicon Optical Ring Resonators in Pure Python

Optical ring resonators are fundamental building blocks in silicon photonics—used for wavelength-division multiplexing, optical switches, and dispersion engineering.

  • Simulates APRR, SRR, and NRR configurations using pure Python
  • Models 450 nm × 220 nm SOI strip waveguide bent into 10 µm-radius ring
  • Observes -30.6 dB critical-coupling extinction notch on THRU port

NirmalAir: turning today's smog reading into a plan for every person at home

How I built NirmalAir, a GenAI clean-air assistant for Indian households, where real data decides, code calculates, and the AI is only allowed to explain. Every November the same thing happens.

  • NirmalAir is a GenAI clean-air assistant for Indian households.
  • Uses real-time air quality data from CPCB for personalized recommendations.
  • Provides daily timeline with steps to improve indoor air quality based on AQI and PM2.5 levels.

More from Sunday, 29 November 2026 →