UUID Use Case

UUID Object Key

An object store keys blobs by a string. A UUID key is globally unique, lets you shard by prefix, and never clashes with another tenant's file.

Global keyShardableTenant-safe

Generated locally with the Web Crypto API — nothing leaves your browser.

What Is UUID Object Key?

How to generate

  1. Generate a v4 UUID per object.
  2. Optionally prefix with tenant or date for lifecycle rules.
  3. Return the key; resolve the real name from metadata.

Use Cases

Code Examples

JavaScript
const Key = `${tenant}/${crypto.randomUUID()}.${ext}`;
await s3.putObject({ Bucket, Key, Body: buf });

Frequently Asked Questions

Prefix the key with a UUID or a date?
Either; UUID-first gives even distribution, date-first gives easy lifecycle expiry. Pick one and stay consistent.
Can two objects share a key?
No — the store overwrites. That is why a fresh UUID per object is safest.

Related tools