mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-13 07:53:20 -05:00
fix 404 on public files with /login url #6406
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
61fb6898c0
commit
39a1755b3d
@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
|
<html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@ -2694,7 +2694,7 @@
|
|||||||
d3filetreelocation2.push(d3filetreelocation[i]);
|
d3filetreelocation2.push(d3filetreelocation[i]);
|
||||||
if ((folderdepth == 1)) {
|
if ((folderdepth == 1)) {
|
||||||
var sp = d3filetreelocation[i].split('/');
|
var sp = d3filetreelocation[i].split('/');
|
||||||
publicPath = window.location + sp[0] + 'files/' + sp[2];
|
publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
|
||||||
if (d3filetreelocation[i] === userinfo._id) { d3filetreelinkpath += 'self'; } else { d3filetreelinkpath += (sp[0] + '/' + sp[2]); }
|
if (d3filetreelocation[i] === userinfo._id) { d3filetreelinkpath += 'self'; } else { d3filetreelinkpath += (sp[0] + '/' + sp[2]); }
|
||||||
} else {
|
} else {
|
||||||
if (d3filetreelinkpath != '') { d3filetreelinkpath += '/' + d3filetreelocation[i]; if (folderdepth > 2) { publicPath += '/' + d3filetreelocation[i]; } }
|
if (d3filetreelinkpath != '') { d3filetreelinkpath += '/' + d3filetreelocation[i]; if (folderdepth > 2) { publicPath += '/' + d3filetreelocation[i]; } }
|
||||||
@ -2788,7 +2788,7 @@
|
|||||||
fullPath += ' / ' + filetreelocation[i];
|
fullPath += ' / ' + filetreelocation[i];
|
||||||
if ((folderdepth == 1)) {
|
if ((folderdepth == 1)) {
|
||||||
var sp = filetreelocation[i].split('/');
|
var sp = filetreelocation[i].split('/');
|
||||||
publicPath = window.location + sp[0] + 'files/' + sp[2];
|
publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
|
||||||
//if (filetreelocation[i] === userinfo._id) { filetreelinkpath += 'self'; } else { filetreelinkpath += (sp[0] + '/' + sp[2]); }
|
//if (filetreelocation[i] === userinfo._id) { filetreelinkpath += 'self'; } else { filetreelinkpath += (sp[0] + '/' + sp[2]); }
|
||||||
filetreelinkpath += filetreelocation[i];
|
filetreelinkpath += filetreelocation[i];
|
||||||
} else {
|
} else {
|
||||||
|
@ -14729,7 +14729,7 @@
|
|||||||
fullPath += ' / ' + filetreelocation[i];
|
fullPath += ' / ' + filetreelocation[i];
|
||||||
if ((folderdepth == 1)) {
|
if ((folderdepth == 1)) {
|
||||||
var sp = filetreelocation[i].split('/');
|
var sp = filetreelocation[i].split('/');
|
||||||
publicPath = (("" + window.location).split('?')[0]) + sp[0] + 'files/' + sp[2];
|
publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
|
||||||
//if (filetreelocation[i] === userinfo._id) { filetreelinkpath += 'self'; } else { filetreelinkpath += (sp[0] + '/' + sp[2]); }
|
//if (filetreelocation[i] === userinfo._id) { filetreelinkpath += 'self'; } else { filetreelinkpath += (sp[0] + '/' + sp[2]); }
|
||||||
filetreelinkpath += filetreelocation[i];
|
filetreelinkpath += filetreelocation[i];
|
||||||
} else {
|
} else {
|
||||||
@ -17394,7 +17394,7 @@
|
|||||||
d3filetreelocation2.push(d3filetreelocation[i]);
|
d3filetreelocation2.push(d3filetreelocation[i]);
|
||||||
if ((folderdepth == 1)) {
|
if ((folderdepth == 1)) {
|
||||||
var sp = d3filetreelocation[i].split('/');
|
var sp = d3filetreelocation[i].split('/');
|
||||||
publicPath = window.location + sp[0] + 'files/' + sp[2];
|
publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
|
||||||
if (d3filetreelocation[i] === userinfo._id) { d3filetreelinkpath += 'self'; } else { d3filetreelinkpath += (sp[0] + '/' + sp[2]); }
|
if (d3filetreelocation[i] === userinfo._id) { d3filetreelinkpath += 'self'; } else { d3filetreelinkpath += (sp[0] + '/' + sp[2]); }
|
||||||
} else {
|
} else {
|
||||||
if (d3filetreelinkpath != '') { d3filetreelinkpath += '/' + d3filetreelocation[i]; if (folderdepth > 2) { publicPath += '/' + d3filetreelocation[i]; } }
|
if (d3filetreelinkpath != '') { d3filetreelinkpath += '/' + d3filetreelocation[i]; if (folderdepth > 2) { publicPath += '/' + d3filetreelocation[i]; } }
|
||||||
|
Loading…
Reference in New Issue
Block a user