Skip to content

basalt / drives-dropbox/src / DROPBOX_BLOCK_BYTES

Variable: DROPBOX_BLOCK_BYTES ​

> const DROPBOX_BLOCK_BYTES: number

Defined in: drives-dropbox/src/content-hash.ts:18

Dropbox's content_hash.

Not SHA-256 of the file, and not a plain digest of anything: the file is cut into 4 MiB blocks, each block is SHA-256'd, the 32-byte digests are concatenated in order, and that concatenation is SHA-256'd. The block size is part of the definition — a different one produces a different hash for the same bytes.

It exists here so an app can verify what it stored against what Dropbox said it stored, and so the adapter's own tests can generate fixtures that are right rather than merely consistent with themselves. The drives contract carries it as { algorithm: 'dropboxContentHash', value } and never assumes a checksum is comparable across providers.

Released under the MIT License.