Urgent.News

What's breaking now, across thousands of outlets.

Tech

Private Image Originals and Thumbnails: Retention, Resizing, and Signed Downloads

Short answer: use private object storage for originals and generated thumbnails, run resizing in your Node.js worker or an image service, and return short-lived signed download links. Choose a provider by its retention and recovery behavior, not by the existence of an image-resize checkbox. Infrai belongs in the shortlist when the team wants that storage workflow behind one REST contract. The…

When building a Node.js SaaS, it is crucial to separate private original files and generated thumbnails. Store originals in a dedicated "originals/" prefix and thumbnails in a separate "thumbs/" prefix. Never overwrite originals to publish new variants; instead, use unique keys like originals/{tenantId}/{imageId}/source.jpg and maintain a record of each variant in your database.

The workflow starts with an API authentication step. After creating an image row in the database, a worker fetches the original file, generates the thumbnail, and writes it to the appropriate location in the "thumbs/" prefix. The database then marks the variant as ready. Finally, the API generates a signed GET URL, which the browser uses to download the image.

To ensure reliability, log important details such as request ID, image ID, variant, attempt number, and elapsed time at each step. If a thumbnail generation fails, log it as a visible job state rather than silently failing. Use a retry budget and handle HTTP 429 (Too Many Requests) responses by respecting the Retry-After header.

When working with Infrai storage, remember that it provides private, signed-only storage. It is not a permanent public image host, and you still need to handle resizing and metadata search at the application level. Stick to this simple, boring architecture to ensure a smooth experience for your customers, especially when they request an export at an inconvenient time.

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 to fix 'too many missed start times' in Kubernetes CronJobs (and why your job silently stopped running)

Reliable HTTP cron and delayed-job scheduling with automatic retries and full run logs — delay.run You check on a Kubernetes CronJob that should run every minute and find that it hasn't created a Job…

  • CronJobs stop running after 100 missed start times in default Kubernetes
  • Missed start times can occur due to suspension, controller issues, clock skew, or frequent schedules
  • Set startingDeadlineSeconds to allow runs within a specified late time window

Case study (hypothetical): the provider disabled our webhook endpoint after a weekend of 500s, and nobody noticed for 9 days

Reliable HTTP cron and delayed-job scheduling with automatic retries and full run logs — delay.run This is a hypothetical case study, assembled from a pattern that turns up again and again with…

  • Provider disabled webhook endpoint after 9 days of 500 errors
  • Online booking platform experienced unnoticed 9-day downtime
  • Technical contact outdated email address led to disabled endpoint

A one-sample t statistic in Python: what the number actually compares

A two-point difference can be a big deal or ordinary sampling noise. The t statistic compares that difference with the estimated uncertainty in the sample mean.

  • One-sample t statistic compares sample mean to hypothesized value
  • Larger t value with smaller p-value indicates stronger evidence
  • Assumes independent normal observations for valid results

How to fix 'Blocked due to access forbidden (403)' in Google Search Console (it's usually your WAF or bot rules)

Automated technical SEO checks that catch indexing blocks and deploy regressions — seotto.com Search Console's Pages report has a reason that looks simple: Blocked due to access forbidden (403) .

  • Confirm issue by selecting URLs and performing URL Inspection and live URL test
  • Identify WAF or bot rules layer causing 403 response through headers and body analysis
  • Verify fix by ensuring Googlebot requests return 200 status in live test

Should every URL end with a trailing slash? Let's argue about it

Automated technical SEO checks that catch indexing blocks and deploy regressions — seotto.com Few URL questions generate as much quiet frustration as this one.

  • Trailing slash debate centers on URL format preference
  • Supporters argue alignment with static hosting platforms
  • Opponents prefer URLs without trailing slashes for ease of use

More from Wednesday 18 November →