Download Hashes
Download hashes let CI HUB detect whether a placed asset has changed since it was last downloaded. When a user opens a document, CI HUB compares the stored hash against the current hash from the adapter — if they differ, the asset is flagged as updated.
Hash fields
Return one hash field per asset. The field name determines the algorithm:
| Field | Algorithm | Description |
|---|---|---|
downloadHashMd5 | MD5 | Standard MD5 hash of the full file |
downloadHashSha1 | SHA-1 | SHA-1 hash of the full file |
downloadHashSha256 | SHA-256 | SHA-256 hash of the full file |
downloadHashSha512 | SHA-512 | SHA-512 hash of the full file |
downloadHashCrc32 | CRC-32 | CRC-32 checksum of the full file |
downloadHashSha256Split4MB | SHA-256 (split) | SHA-256 hashes of 4MB chunks, concatenated |
downloadHashSha256First16MB | SHA-256 (first 16MB) | SHA-256 of only the first 16MB of the file |
downloadHashFileAttributes | File attributes | JSON string of { fileSize, modified } — not a cryptographic hash |
assetHashAlgorithm in capabilities
Declare which algorithm your adapter uses in the info response:
capabilities: {
category: 'DAM',
assetHashAlgorithm: 'Sha256',
}Valid values: 'Md5', 'Sha1', 'Sha256Split4MB', 'Sha256First16MB', 'Sha256', 'Sha512', 'FileAttributes', 'Crc32'
This tells CI HUB which hash to compute locally when comparing placed assets. It must match the hash field you return on assets.
Returning hashes on assets
Add the hash field directly on the asset object:
const asset = {
id: item.id,
name: item.name,
downloadUrl: item.downloadUrl,
downloadHashSha256: item.sha256Checksum,
}downloadHashFileAttributes
A non-cryptographic approach. Instead of hashing file content, store the file size and modification timestamp as a JSON string. Useful when your platform doesn't expose content hashes but does track file metadata:
const asset = {
id: item.id,
name: item.name,
downloadHashFileAttributes: JSON.stringify({
fileSize: item.size,
modified: new Date(item.lastModifiedDateTime).getTime(),
}),
}CI HUB compares these attributes to detect changes. Less reliable than cryptographic hashes (a file could be modified without changing size) but requires no server-side hashing.
Do not use this algorithm unless your platform doesn't expose content hashes.
searchByHash
If your adapter supports looking up assets by their content hash, set searchByHash in the assetSearch configuration to the algorithm name:
capabilities: {
assetSearch: {
searchByHash: 'Sha256',
},
assetHashAlgorithm: 'Sha256',
}CI HUB uses this for relink operations — when a placed asset's link is broken, the client can search by hash to find the matching asset on the remote system.