Skip to content

routier-collection


routier-collection / plugins/blob/src / blobKey

Function: blobKey()

blobKey(digest): string

Defined in: plugins/blob/src/content.ts:107

The key for a given checksum.

Content-addressed, and that decision earns three things. An upload is idempotent, so a retry cannot create a second object. Identical bytes uploaded from anywhere land on one object, so a file attached to a thousand records is stored once. And a key cannot be wrong about what it holds, because the key is what it holds.

It also has one consequence that must not be forgotten: two records can reference the same key, so deleting a record must never delete its object. See sweepOrphans.

Parameters

digest

string

Returns

string

Released under the MIT License.