diff --git a/www/common/common-hash.js b/www/common/common-hash.js index 620acd319..b282a1b94 100644 --- a/www/common/common-hash.js +++ b/www/common/common-hash.js @@ -266,5 +266,9 @@ Version 2 return hex; }; + var getBlobPath = Hash.getBlobPathFromHex = function (id) { + return '/blob/' + id.slice(0,2) + '/' + id; + }; + return Hash; }); diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 5d8ab7804..f4834b285 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -73,6 +73,7 @@ define([ var hrefToHexChannelId = common.hrefToHexChannelId = Hash.hrefToHexChannelId; var parseHash = common.parseHash = Hash.parseHash; var getRelativeHref = common.getRelativeHref = Hash.getRelativeHref; + common.getBlobPathFromHex = Hash.getBlobPathFromHex; common.getEditHashFromKeys = Hash.getEditHashFromKeys; common.getViewHashFromKeys = Hash.getViewHashFromKeys;