From 9072cbce340da55477906f5419a4cfb6d6937dc0 Mon Sep 17 00:00:00 2001 From: Ramires Viana <59319979+ramiresviana@users.noreply.github.com> Date: Sun, 13 Jul 2025 14:29:27 -0300 Subject: [PATCH 1/5] fix: invalid path when uploading files --- frontend/src/api/tus.ts | 4 ++-- http/tus_handlers.go | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/api/tus.ts b/frontend/src/api/tus.ts index 64efe69a..fbfef4da 100644 --- a/frontend/src/api/tus.ts +++ b/frontend/src/api/tus.ts @@ -1,5 +1,5 @@ import * as tus from "tus-js-client"; -import { baseURL, tusEndpoint, tusSettings } from "@/utils/constants"; +import { baseURL, tusEndpoint, tusSettings, origin } from "@/utils/constants"; import { useAuthStore } from "@/stores/auth"; import { useUploadStore } from "@/stores/upload"; import { removePrefix } from "@/api/utils"; @@ -35,7 +35,7 @@ export async function upload( } return new Promise((resolve, reject) => { const upload = new tus.Upload(content, { - endpoint: `${baseURL}${resourcePath}`, + endpoint: `${origin}${baseURL}${resourcePath}`, chunkSize: tusSettings.chunkSize, retryDelays: computeRetryDelays(tusSettings), parallelUploads: 1, diff --git a/http/tus_handlers.go b/http/tus_handlers.go index c5eec9ad..002d78b5 100644 --- a/http/tus_handlers.go +++ b/http/tus_handlers.go @@ -147,7 +147,8 @@ func tusPostHandler() handleFunc { // Enables the user to utilize the PATCH endpoint for uploading file data registerUpload(file.RealPath(), uploadLength) - w.Header().Set("Location", "/api/tus/"+r.URL.Path) + // Signal the frontend to reuse the current request URL + w.Header().Set("Location", "") return http.StatusCreated, nil }) From 035084d8e83243065fad69bfac1b69559fbad5fb Mon Sep 17 00:00:00 2001 From: outlook84 <96007761+outlook84@users.noreply.github.com> Date: Mon, 14 Jul 2025 02:44:50 +0800 Subject: [PATCH 2/5] feat: add font size botton to text editor (#5290) --- frontend/src/views/files/Editor.vue | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/frontend/src/views/files/Editor.vue b/frontend/src/views/files/Editor.vue index 95867033..f40fa392 100644 --- a/frontend/src/views/files/Editor.vue +++ b/frontend/src/views/files/Editor.vue @@ -4,6 +4,18 @@ {{ fileStore.req?.name ?? "" }} + + {{ fontSize }}px + + (null); +const fontSize = ref(parseInt(localStorage.getItem("editorFontSize") || "14")); const isPreview = ref(false); const previewContent = ref(""); @@ -121,6 +134,7 @@ onMounted(() => { editor.value!.setTheme("ace/theme/twilight"); } + editor.value.setFontSize(fontSize.value); editor.value.focus(); }); @@ -186,6 +200,21 @@ const save = async () => { $showError(e); } }; + +const increaseFontSize = () => { + fontSize.value += 1; + editor.value?.setFontSize(fontSize.value); + localStorage.setItem("editorFontSize", fontSize.value.toString()); +}; + +const decreaseFontSize = () => { + if (fontSize.value > 1) { + fontSize.value -= 1; + editor.value?.setFontSize(fontSize.value); + localStorage.setItem("editorFontSize", fontSize.value.toString()); + } +}; + const close = () => { if (!editor.value?.session.getUndoManager().isClean()) { layoutStore.showHover("discardEditorChanges"); @@ -202,3 +231,10 @@ const preview = () => { isPreview.value = !isPreview.value; }; + + From b8454bb2e41ca2848b926b66354468ba4b1c7ba5 Mon Sep 17 00:00:00 2001 From: jagadam97 Date: Sun, 13 Jul 2025 06:07:13 +0530 Subject: [PATCH 3/5] fix: Only left click should drag the image in extended image view --- frontend/src/components/files/ExtendedImage.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/files/ExtendedImage.vue b/frontend/src/components/files/ExtendedImage.vue index e872bfbe..88b78304 100644 --- a/frontend/src/components/files/ExtendedImage.vue +++ b/frontend/src/components/files/ExtendedImage.vue @@ -172,7 +172,8 @@ const setCenter = () => { imgex.value.style.top = position.value.center.y + "px"; }; -const mousedownStart = (event: Event) => { +const mousedownStart = (event: MouseEvent) => { + if (event.button !== 0) return; lastX.value = null; lastY.value = null; inDrag.value = true; @@ -184,8 +185,10 @@ const mouseMove = (event: MouseEvent) => { event.preventDefault(); }; const mouseUp = (event: Event) => { + if (inDrag.value) { + event.preventDefault(); + } inDrag.value = false; - event.preventDefault(); }; const touchStart = (event: TouchEvent) => { lastX.value = null; From 124abc764366c78fb0d14f10d482f132f0c1fae1 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sun, 13 Jul 2025 21:28:46 +0200 Subject: [PATCH 4/5] chore: remove ln from init.sh --- docker/alpine/healthcheck.sh | 6 +++--- docker/alpine/init.sh | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docker/alpine/healthcheck.sh b/docker/alpine/healthcheck.sh index 70e71bf6..f86550dc 100644 --- a/docker/alpine/healthcheck.sh +++ b/docker/alpine/healthcheck.sh @@ -2,8 +2,8 @@ set -e -PORT=${FB_PORT:-$(cat /tmp/FB_CONFIG | sh /JSON.sh | grep '\["port"\]' | awk '{print $2}')} -ADDRESS=${FB_ADDRESS:-$(cat /tmp/FB_CONFIG | sh /JSON.sh | grep '\["address"\]' | awk '{print $2}' | sed 's/"//g')} +PORT=${FB_PORT:-$(cat /config/settings.json | sh /JSON.sh | grep '\["port"\]' | awk '{print $2}')} +ADDRESS=${FB_ADDRESS:-$(cat /config/settings.json | sh /JSON.sh | grep '\["address"\]' | awk '{print $2}' | sed 's/"//g')} ADDRESS=${ADDRESS:-localhost} -wget -q --spider http://$ADDRESS:$PORT/health || exit 1 \ No newline at end of file +wget -q --spider http://$ADDRESS:$PORT/health || exit 1 diff --git a/docker/alpine/init.sh b/docker/alpine/init.sh index 5ea2cf6e..a4ac72ae 100755 --- a/docker/alpine/init.sh +++ b/docker/alpine/init.sh @@ -32,7 +32,4 @@ if [ -z "$config_file" ]; then set -- --config=/config/settings.json "$@" fi -# Create a symlink to the config file for compatibility with the healthcheck script -ln -s "$config_file" /tmp/FB_CONFIG - -exec filebrowser "$@" \ No newline at end of file +exec filebrowser "$@" From 545c9722148900fe7b2a54b5260d3882f545c79b Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sun, 13 Jul 2025 21:29:02 +0200 Subject: [PATCH 5/5] chore(release): 2.40.0 --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2a68f7d..fedfbbfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,19 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.40.0](https://github.com/filebrowser/filebrowser/compare/v2.39.0...v2.40.0) (2025-07-13) + + +### Features + +* add font size botton to text editor ([#5290](https://github.com/filebrowser/filebrowser/issues/5290)) ([035084d](https://github.com/filebrowser/filebrowser/commit/035084d8e83243065fad69bfac1b69559fbad5fb)) + + +### Bug Fixes + +* invalid path when uploading files ([9072cbc](https://github.com/filebrowser/filebrowser/commit/9072cbce340da55477906f5419a4cfb6d6937dc0)) +* Only left click should drag the image in extended image view ([b8454bb](https://github.com/filebrowser/filebrowser/commit/b8454bb2e41ca2848b926b66354468ba4b1c7ba5)) + ## [2.39.0](https://github.com/filebrowser/filebrowser/compare/v2.38.0...v2.39.0) (2025-07-13)