This commit is contained in:
2020-05-22 14:48:43 +00:00
parent bb9e2cd107
commit 5ae14aa7d3
4 changed files with 60 additions and 8 deletions

View File

@@ -278,7 +278,7 @@ export default {
ret.push({
id: o.id,
concurrency: o.concurrency,
url: window.$gz.api.downloadUrl(o.id, o.contentType),
url: window.$gz.api.attachmentDownloadUrl(o.id, o.contentType),
name: o.displayFileName,
date: window.$gz.locale.utcDateToShortDateAndTimeLocalized(
o.lastModified,

View File

@@ -400,7 +400,7 @@ export default {
}
//replace attachment urls with tokenized local urls
let src = this.localVal.replace(/\[ATTACH:(.*)\]/g, function(match, p1) {
return window.$gz.api.downloadUrl(p1);
return window.$gz.api.attachmentDownloadUrl(p1);
});
return DOMPurify.sanitize(marked(src, { breaks: true }));
@@ -881,7 +881,7 @@ export default {
//let them attach any file type to the wiki since it supports it anyway
ret.push({
id: o.id,
url: window.$gz.api.downloadUrl(o.id, o.contentType),
url: window.$gz.api.attachmentDownloadUrl(o.id, o.contentType),
name: o.displayFileName
});
//}
@@ -932,7 +932,7 @@ export default {
//attachment?
if (url.includes("attachment/download/")) {
//it's an attachment url so fixup accordingly
//i paramter added by gzapi::downloadUrl function
//i paramter added by gzapi::attachmentDownloadUrl function
isImageUrl = url.includes("&i=");
let m = url.match(/attachment\/download\/(.*)\?t=/);
if (m.length > 1) {