Skip to content

Commit

Permalink
compatibility qr code {filename} like v4 (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
zendre4 authored Jan 25, 2025
1 parent f51b3f5 commit 583818c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/GalleryDetailPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
})
Expand Down

0 comments on commit 583818c

Please sign in to comment.