Explorar el Código

[frontend] Add knox prefix to download url

Björn Alm hace 3 años
padre
commit
16c82c9e32
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      desktop/core/src/desktop/js/onePageViewModel.js

+ 2 - 1
desktop/core/src/desktop/js/onePageViewModel.js

@@ -894,7 +894,8 @@ class OnePageViewModel {
         // The download view on the backend requires the slashes not to
         // be encoded in order for the file to be correctly named.
         const encodedPath = encodeURIComponent(decodedPath).replaceAll('%2F', '/');
-        window.location = pathPrefix + encodedPath;
+        const possibleKnoxUrlPathPrefix = window.HUE_BASE_URL;
+        window.location = possibleKnoxUrlPathPrefix + pathPrefix + encodedPath;
         return;
       }