refix publicfiles sharing for folder based domains #6406
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
Oct 1, 2024 at 11:47 UTC
952bcde25f7e36f3c7a50b34e7991c44ae25f844
2 files changed
+4
-4
views/default-mobile.handlebars
+2
-2
@@ -2694,7 +2694,7 @@
2694
d3filetreelocation2.push(d3filetreelocation[i]);
2695
if ((folderdepth == 1)) {
2696
var sp = d3filetreelocation[i].split('/');
2697
- publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
2697
+ publicPath = window.location.origin + domainUrl + sp[0] + 'files/' + sp[2];
2698
if (d3filetreelocation[i] === userinfo._id) { d3filetreelinkpath += 'self'; } else { d3filetreelinkpath += (sp[0] + '/' + sp[2]); }
2699
} else {
2700
if (d3filetreelinkpath != '') { d3filetreelinkpath += '/' + d3filetreelocation[i]; if (folderdepth > 2) { publicPath += '/' + d3filetreelocation[i]; } }
@@ -2788,7 +2788,7 @@
2788
fullPath += ' / ' + filetreelocation[i];
2789
if ((folderdepth == 1)) {
2790
var sp = filetreelocation[i].split('/');
2791
- publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
2791
+ publicPath = window.location.origin + domainUrl + sp[0] + 'files/' + sp[2];
2792
//if (filetreelocation[i] === userinfo._id) { filetreelinkpath += 'self'; } else { filetreelinkpath += (sp[0] + '/' + sp[2]); }
2793
filetreelinkpath += filetreelocation[i];
2794
} else {
views/default.handlebars
+2
-2
@@ -14750,7 +14750,7 @@
14750
fullPath += ' / ' + filetreelocation[i];
14751
if ((folderdepth == 1)) {
14752
var sp = filetreelocation[i].split('/');
14753
- publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
14753
+ publicPath = window.location.origin + domainUrl + sp[0] + 'files/' + sp[2];
14754
//if (filetreelocation[i] === userinfo._id) { filetreelinkpath += 'self'; } else { filetreelinkpath += (sp[0] + '/' + sp[2]); }
14755
filetreelinkpath += filetreelocation[i];
14756
} else {
@@ -17415,7 +17415,7 @@
17415
d3filetreelocation2.push(d3filetreelocation[i]);
17416
if ((folderdepth == 1)) {
17417
var sp = d3filetreelocation[i].split('/');
17418
- publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
17418
+ publicPath = window.location.origin + domainUrl + sp[0] + 'files/' + sp[2];
17419
if (d3filetreelocation[i] === userinfo._id) { d3filetreelinkpath += 'self'; } else { d3filetreelinkpath += (sp[0] + '/' + sp[2]); }
17420
} else {
17421
if (d3filetreelinkpath != '') { d3filetreelinkpath += '/' + d3filetreelocation[i]; if (folderdepth > 2) { publicPath += '/' + d3filetreelocation[i]; } }