Urgent.News

What's breaking now, across thousands of outlets.

AI

Node.js Storage Pattern for AI-Generation Apps: Private Originals, Thumbnails, and Expiry

Short answer: use private object storage with a tenant-owned key namespace, keep originals and derived images as separate records, issue short-lived signed links, and make deletion a state transition that a worker can verify. For an education app that accepts large AI-generated images, this keeps upload bytes away from the Node.js process while making isolation testable. The interesting decision…

When building AI image-generation apps that handle private user content, a recommended storage approach involves using private object storage with a tenant-owned key namespace. This method separates original images from derived thumbnails and allows for setting expiry times. For instance, in an educational app, images could be organized in a predictable hierarchy, such as tenants/school_42/assets/asset_9f2/original/source.png, tenants/school_42/assets/asset_9f2/variant/1024.webp, and tenants/school_42/assets/asset_9f2/thumbnail/320.webp.

The metadata for an asset would include the tenant ID, owner ID, media role, content type, byte length, checksum, and lifecycle state.

Node.js should handle uploads to a single key and content type, avoiding large buffers during rendering. The tenant check should be implemented in each command handler rather than just in the download endpoint. After upload, the server should look up the asset by an opaque ID rather than relying on the browser-provided key. For variant creation and deletion, the worker should load the source row and derive the destination key, ensuring that authorization checks are performed consistently across all layers.

When generating signed links for object access, remember that they are temporary capabilities, not a substitute for authorization checks. The API should authenticate the viewer, load the asset metadata, verify tenant and role permissions, and then request a GET URL from the storage service. Signed links should have short expirations to maintain security, and they should not be stored in the database, email templates, or analytics events.

Deletion should follow a similar disciplined approach, where the row status is marked as 'deleting', all known keys are enqueued, and the worker idempotently deletes each object, confirming no live objects remain before marking the row as 'deleted'. A retry that encounters an absent object should be treated as a success, ensuring retryability.

By following these guidelines, application developers can maintain secure, isolated storage for AI-generated content while simplifying operational complexities for multi-tenant environments.

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 AI

What broke when I put an AI voice agent on real phone lines

I build AI phone agents for home service companies. A voice agent (Retell) answers the call, and n8n workflows do the work behind it: checking a calendar, booking, writing to the CRM.

  • AI voice agents struggled to determine business open/closed status accurately.
  • Agent incorrectly claimed booked appointments, causing caller inconvenience.
  • Dead air during tool calls lasted up to 27 seconds, frustrating callers.

ErrorCopy: AI Error Explainer

Originally published at gidadomukhta.me . Install it from the VS Code Marketplace or read the source on GitHub . Most error messages are only half the story.

  • ErrorCopy extension simplifies obtaining AI-assistant info for TypeScript errors
  • Reads diagnostic info from VS Code's language diagnostics API
  • Provides Copy Error with Context and Explain This Error commands

European Commission Confirms AI-Assisted ARTEX Hack That Took HR Systems Offline for 10 Days

For more than a week, European Commission staff could not check a payslip, file for leave, submit a timesheet or claim a medical reimbursement through the internal platforms they normally rely on.

  • European Commission's HR systems offline for 10 days due to AI-assisted hack.
  • Attack exploited open-source AI-powered penetration-testing tool ARTEX.
  • Commission acknowledged incident on November 19, 2026, after services restored.

Your AI found a customer 'trend'. Check it in Python before it reaches a slide

This article was created with the help of AI. I ran and tested the code before publishing (Python 3.13.5, standard library only, 30/30 tests passing) and cross-checked the interval maths against…

  • AI analyzes customer conversations, tagging themes like invoice confusion or login failure
  • Ranked lists hide important data, leading to potential misinterpretation of results
  • Gate verifies quotes against transcript, ensuring accurate tagging and trustworthy insights

More from Friday 20 November →