From e2ff6c7c3028b626298256f219fa48a535544db7 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 23 Aug 2019 17:38:08 +0200 Subject: [PATCH] Fix fileHost in the file app --- www/file/inner.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/file/inner.js b/www/file/inner.js index efbbd46a4..6a78e5f45 100644 --- a/www/file/inner.js +++ b/www/file/inner.js @@ -59,6 +59,7 @@ define([ var secret; var metadataMgr = common.getMetadataMgr(); var priv = metadataMgr.getPrivateData(); + var fileHost = priv.fileHost || priv.origin; if (!priv.filehash) { uploadMode = true; @@ -88,7 +89,7 @@ define([ if (!uploadMode) { var hexFileName = secret.channel; - var src = Hash.getBlobPathFromHex(hexFileName); + var src = fileHost + Hash.getBlobPathFromHex(hexFileName); var key = secret.keys && secret.keys.cryptKey; var cryptKey = Nacl.util.encodeBase64(key);