From 804b14b698aa218fa5c2aaba687e72c5f7617f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Baczy=C5=84ski?= Date: Sun, 15 Feb 2026 12:46:39 +0100 Subject: [PATCH] feat: add 'Open direct' button to images (#5678) --- frontend/src/i18n/en.json | 1 + frontend/src/views/files/Preview.vue | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index 8938cb06..54b30b22 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -42,6 +42,7 @@ "update": "Update", "upload": "Upload", "openFile": "Open file", + "openDirect": "View raw", "discardChanges": "Discard", "stopSearch": "Stop searching", "saveChanges": "Save changes", diff --git a/frontend/src/views/files/Preview.vue b/frontend/src/views/files/Preview.vue index 46670a35..9a67de2d 100644 --- a/frontend/src/views/files/Preview.vue +++ b/frontend/src/views/files/Preview.vue @@ -46,6 +46,16 @@ :label="$t('buttons.download')" @action="download" /> + fileStore.req ? api.getDownloadURL(fileStore.req, false) : "" ); +const directUrl = computed(() => + fileStore.req ? api.getDownloadURL(fileStore.req, true) : "" +); + const previewUrl = computed(() => { if (!fileStore.req) { return ""; @@ -470,6 +484,7 @@ const close = () => { }; const download = () => window.open(downloadUrl.value); +const openDirect = () => window.open(directUrl.value); const editAsText = () => { router.push({ path: route.path, query: { edit: "true" } });