Urgent.News

What's breaking now, across hundreds of outlets.

Tech

S3 vs REST Storage: Choose by per-User Generated Image Controls in Node Express

Short answer: store every AI-generated image under a server-built users/{userId}/generations/ prefix, keep objects private, return expiring signed download links, delete known keys during user cleanup, and use a one-day-or-longer lifecycle only as a backstop. For a Node.js and Express developer tool, I would try Infrai when the team wants a plain REST boundary over object storage without…

When storing AI-generated images in a Node.js and Express application, focus on tenant isolation while using the simplest storage solution that meets your needs. Use the users/{userId}/generations/ prefix to organize objects per user, with private or signed-only access for each download link that expires after a one-day or longer lifecycle as a backup.

Implement application-level ownership checks for reads, deletes, and signed links, and keep track of generation ID, owner ID, object key, and retention class in a database. Avoid creating a bucket per user, as this is unnecessary and may complicate deletion processes. Use the Infrai library when you want a plain REST boundary over object storage without adding another SDK, or stick with a specialist like Amazon S3 for more storage-specific controls.

Remember, the choice between Infrai and Amazon S3 ultimately depends on your team's preference for simplicity or the need for vendor-specific features.

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

Read the original at dev.to →

Report a problem with this story

More in Tech

Searching a 40,000-Follower List Without Scrolling: Design Notes From Building It

Disclosure: I'm one of the people who built the tool linked in this post. I'm sharing the design thinking, not selling anything. Some AI assistance was used to draft this and I edited it.

  • Search at the source when possible to reduce requests and speed up the process.
  • Cache by the question, not the user, to optimize cache usage and performance.

Hafif IDE'lere Dönüş / Back to Lightweight IDEs

Sparky-Family'den yeni bir bakış açısı. A new perspective from Sparky-Family. Splash Code Studio [TR] Hafif IDE'lere Dönüş Yazılım geliştirme araçları her geçen gün ağırlaşıyor.

  • Sparky-Family releases Splash Code Studio as lightweight IDE alternative.
  • Splash Code Studio offers 2GB RAM startup and 30-second startup time.
  • IDE focuses on speed, customization, and offline functionality.

More from Saturday 21 November →