Menu

Healthtech Avatar Handoffs in Node.js — Presigned S3-Compatible Storage
📰

Healthtech Avatar Handoffs in Node.js — Presigned S3-Compatible Storage

DEV Community·SiegfriedFletcher5869·12 days ago
#NxRMG1M1
#dev#object#avatar#storage#upload
Reading 0:00
15s threshold

Use a short-lived presigned URL for each tenant's avatar, then validate the object before saving its key in your database. That keeps image bytes off the application server and makes the important decision explicit: an avatar is replaceable data with a deletion deadline, not a public asset or an immutable record.

The useful mental model is small:

Before: browser → Node.js → object storage → database.

After: browser → object storage, while Node.js issues permission and records the result.

The server still owns authorization. The browser receives one narrowly scoped upload URL, with an expiry and a content-type constraint. It never receives the storage service key.

How should Node.js upload a user avatar to S3-compatible storage?

Imagine a clinic platform with tenants north-clinic and harbor-clinic . A user changes an avatar.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.