From 583818cfcac4c605ca117bcf596c5514637bed77 Mon Sep 17 00:00:00 2001 From: Julien Stalder Date: Sat, 25 Jan 2025 21:40:26 +0100 Subject: [PATCH] compatibility qr code {filename} like v4 (#96) --- src/pages/GalleryDetailPage.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pages/GalleryDetailPage.vue b/src/pages/GalleryDetailPage.vue index 94ee360..5a2abf8 100644 --- a/src/pages/GalleryDetailPage.vue +++ b/src/pages/GalleryDetailPage.vue @@ -118,7 +118,12 @@ const qrShareUrl = computed(() => { return `${qrShareServiceUrl}?action=download&id=${selectedMediaitemId.value}` } else { const customUrl = configurationStore.configuration.qrshare.share_custom_qr_url - return customUrl.replace('{filename}', selectedMediaitemId.value).replace('{identifier}', selectedMediaitemId.value) + + const pathInData = configurationStore.configuration.qrshare.shareservice_share_original + ? currentMediaitem.value.unprocessed + : currentMediaitem.value.processed + const getFileName = (filePath) => filePath.substring(filePath.lastIndexOf('/') + 1) + return customUrl.replace('{filename}', getFileName(pathInData)).replace('{identifier}', selectedMediaitemId.value) } })