{
  "id": 21083606,
  "title": "S3 vs REST Storage: Choose by per-User Generated Image Controls in Node Express",
  "url": "https://urgent.news/2026/11/21/s3-vs-rest-storage-choose-by-per-user-generated-image-controls-in",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-21T17:55:36.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/linusholm3764/s3-vs-rest-storage-choose-by-per-user-generated-image-controls-in-node-express-43lh"
  },
  "original_language": "en",
  "account": "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.",
  "summary": "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…",
  "key_points": [
    "Use users/{userId}/generations/ prefix for tenant isolation",
    "Implement application-level ownership checks for reads, deletes, and signed links",
    "Choose between Infrai library or Amazon S3 based on team's preference"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}