fix 404 on public files with /login url #6406
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 committed
Sep 26, 2024 at 19:21 UTC
39a1755b3d2815f7cd8536c03bfa450109aa5351
2 files changed
+5
-5
views/default-mobile.handlebars
+3
-3
@@ -1,4 +1,4 @@
1
-<!DOCTYPE html>
1
+<!DOCTYPE html>
2
<html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
3
<head>
4
<meta charset="utf-8">
@@ -2694,7 +2694,7 @@
2694
d3filetreelocation2.push(d3filetreelocation[i]);
2695
if ((folderdepth == 1)) {
2696
var sp = d3filetreelocation[i].split('/');
2697
- publicPath = window.location + sp[0] + 'files/' + sp[2];
2697
+ publicPath = window.location.origin + '/' + 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 + sp[0] + 'files/' + sp[2];
2791
+ publicPath = window.location.origin + '/' + 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
@@ -14729,7 +14729,7 @@
14729
fullPath += ' / ' + filetreelocation[i];
14730
if ((folderdepth == 1)) {
14731
var sp = filetreelocation[i].split('/');
14732
- publicPath = (("" + window.location).split('?')[0]) + sp[0] + 'files/' + sp[2];
14732
+ publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
14733
//if (filetreelocation[i] === userinfo._id) { filetreelinkpath += 'self'; } else { filetreelinkpath += (sp[0] + '/' + sp[2]); }
14734
filetreelinkpath += filetreelocation[i];
14735
} else {
@@ -17394,7 +17394,7 @@
17394
d3filetreelocation2.push(d3filetreelocation[i]);
17395
if ((folderdepth == 1)) {
17396
var sp = d3filetreelocation[i].split('/');
17397
- publicPath = window.location + sp[0] + 'files/' + sp[2];
17397
+ publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
17398
if (d3filetreelocation[i] === userinfo._id) { d3filetreelinkpath += 'self'; } else { d3filetreelinkpath += (sp[0] + '/' + sp[2]); }
17399
} else {
17400
if (d3filetreelinkpath != '') { d3filetreelinkpath += '/' + d3filetreelocation[i]; if (folderdepth > 2) { publicPath += '/' + d3filetreelocation[i]; } }