From 952bcde25f7e36f3c7a50b34e7991c44ae25f844 Mon Sep 17 00:00:00 2001 From: si458 Date: Tue, 1 Oct 2024 11:47:41 +0100 Subject: [PATCH] refix publicfiles sharing for folder based domains #6406 Signed-off-by: si458 --- views/default-mobile.handlebars | 4 ++-- views/default.handlebars | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index 5275ed7c..fd6f10bf 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -2694,7 +2694,7 @@ d3filetreelocation2.push(d3filetreelocation[i]); if ((folderdepth == 1)) { var sp = d3filetreelocation[i].split('/'); - publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2]; + publicPath = window.location.origin + domainUrl + sp[0] + 'files/' + sp[2]; if (d3filetreelocation[i] === userinfo._id) { d3filetreelinkpath += 'self'; } else { d3filetreelinkpath += (sp[0] + '/' + sp[2]); } } else { if (d3filetreelinkpath != '') { d3filetreelinkpath += '/' + d3filetreelocation[i]; if (folderdepth > 2) { publicPath += '/' + d3filetreelocation[i]; } } @@ -2788,7 +2788,7 @@ fullPath += ' / ' + filetreelocation[i]; if ((folderdepth == 1)) { var sp = filetreelocation[i].split('/'); - publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2]; + publicPath = window.location.origin + domainUrl + sp[0] + 'files/' + sp[2]; //if (filetreelocation[i] === userinfo._id) { filetreelinkpath += 'self'; } else { filetreelinkpath += (sp[0] + '/' + sp[2]); } filetreelinkpath += filetreelocation[i]; } else { diff --git a/views/default.handlebars b/views/default.handlebars index 91030485..61eb75f4 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -14750,7 +14750,7 @@ fullPath += ' / ' + filetreelocation[i]; if ((folderdepth == 1)) { var sp = filetreelocation[i].split('/'); - publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2]; + publicPath = window.location.origin + domainUrl + sp[0] + 'files/' + sp[2]; //if (filetreelocation[i] === userinfo._id) { filetreelinkpath += 'self'; } else { filetreelinkpath += (sp[0] + '/' + sp[2]); } filetreelinkpath += filetreelocation[i]; } else { @@ -17415,7 +17415,7 @@ d3filetreelocation2.push(d3filetreelocation[i]); if ((folderdepth == 1)) { var sp = d3filetreelocation[i].split('/'); - publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2]; + publicPath = window.location.origin + domainUrl + sp[0] + 'files/' + sp[2]; if (d3filetreelocation[i] === userinfo._id) { d3filetreelinkpath += 'self'; } else { d3filetreelinkpath += (sp[0] + '/' + sp[2]); } } else { if (d3filetreelinkpath != '') { d3filetreelinkpath += '/' + d3filetreelocation[i]; if (folderdepth > 2) { publicPath += '/' + d3filetreelocation[i]; } }