From 77fcd633de001e0b31651050a4d574b0c4848880 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 22 Apr 2020 21:49:27 +0000 Subject: [PATCH] --- ayanova/src/api/gzutil.js | 26 ++++++++++++++----- ayanova/src/components/attachment-control.vue | 5 ++-- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/ayanova/src/api/gzutil.js b/ayanova/src/api/gzutil.js index 75a31b5c..44f7307c 100644 --- a/ayanova/src/api/gzutil.js +++ b/ayanova/src/api/gzutil.js @@ -22,7 +22,7 @@ const mimeTypes = { "image/gif": icons.image, "image/jpeg": icons.image, "image/png": icons.image, - + "application/pdf": icons.pdf, "application/msword": icons.word, @@ -54,6 +54,7 @@ const mimeTypes = { "application/gzip": icons.archive, "application/zip": icons.archive, + "application/x-tar": icons.archive, "text/css": icons.code, "text/html": icons.code, @@ -62,7 +63,9 @@ const mimeTypes = { "text/plain": icons.text, "text/richtext": icons.text, - "text/rtf": icons.text + "text/rtf": icons.text, + "application/rtf": icons.text, + "application/json": icons.text }; const extensions = { @@ -95,12 +98,16 @@ const extensions = { gz: icons.archive, zip: icons.archive, + tar: icons.archive, + "7z": icons.archive, css: icons.code, html: icons.code, js: icons.code, - txt: icons.text + txt: icons.text, + json: icons.text, + rtf: icons.text }; export default { @@ -343,12 +350,17 @@ export default { if (iconFromExtension) { return iconFromExtension; } -//debugger; - console.log( - "gzutil:iconForFile -> No icon for file:" + fileName + " Mime:" + mimeType - ); + + // console.log( + // "gzutil:iconForFile -> No icon for file:" + fileName + " Mime:" + mimeType + // ); return "fa-file"; } + /** + * + * + */ + //new functions above here }; diff --git a/ayanova/src/components/attachment-control.vue b/ayanova/src/components/attachment-control.vue index 388b8aa6..0918037e 100644 --- a/ayanova/src/components/attachment-control.vue +++ b/ayanova/src/components/attachment-control.vue @@ -99,8 +99,9 @@ export default { ayaId: this.ayaId, ayaType: this.ayaType, files: this.uploadFiles, - notes: this.notes + notes: this.notes ? this.notes : "" }; + window.$gz.api.uploadAttachment(at).then(res => { //vm.formState.loading = false; if (res.error) { @@ -164,7 +165,7 @@ export default { languageName, hour12 ), - notes: o.notes, + notes: o.notes ? o.notes : "", icon: window.$gz.util.iconForFile(o.displayFileName, o.contentType) }); }