From 2ed078e816c2c6f53755410e958197f3f75bb3d4 Mon Sep 17 00:00:00 2001 From: ingalls Date: Wed, 11 Sep 2024 13:41:42 -0600 Subject: [PATCH] Show Attachments --- .../components/CloudTAK/util/Attachments.vue | 66 ++++++++++--------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/api/web/src/components/CloudTAK/util/Attachments.vue b/api/web/src/components/CloudTAK/util/Attachments.vue index 1b757442f..8cc11d66e 100644 --- a/api/web/src/components/CloudTAK/util/Attachments.vue +++ b/api/web/src/components/CloudTAK/util/Attachments.vue @@ -39,36 +39,41 @@ :create='false' /> @@ -80,7 +85,6 @@ import Upload from '../../util/Upload.vue'; import { IconFile, IconFileUpload, - IconPhoto, IconDownload } from '@tabler/icons-vue'; @@ -93,7 +97,6 @@ export default { name: 'COTAttachments', components: { Upload, - IconPhoto, IconFile, IconDownload, IconFileUpload, @@ -151,10 +154,13 @@ export default { uploadURL: function() { return stdurl(`/api/attachment`); }, - downloadAsset: async function(file) { + downloadAssetUrl: function(file) { const url = stdurl(`/api/attachment/${file.hash}`); url.searchParams.append('token', localStorage.token); - window.open(url, "_blank") + return url; + }, + downloadAsset: async function(file) { + window.open(this.downloadAssetUrl(file), "_blank") }, fetchMetadata: async function() { const url = stdurl(`/api/attachment`);