Direct Uploads and Background Thumbnails for Private Logistics Images
The recommended approach has the browser upload original logistics images straight to a tenant-scoped private storage key, while a background Node.js worker generates the thumbnail. The Next.js API route handles authorization and job recording rather than proxying or resizing the file bytes. Tenant isolation is enforced by deriving all object keys from the authenticated tenant, so browser-supplied filenames cannot override the boundary. The main tradeoff is latency, since queued thumbnails are not immediately available, so synchronous generation is suggested only for small images with strict size limits. Upload completion is treated as a claim to verify against stored metadata rather than proof of validity.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in