From 4fd18a382c31bbe7059d6733ffa371e70051865b Mon Sep 17 00:00:00 2001 From: Jagadam Dinesh Reddy Date: Sat, 10 Jan 2026 14:00:08 +0530 Subject: [PATCH 1/2] feat: force file sync while uploading file (#5668) --- http/resource.go | 6 ++++++ http/tus_handlers.go | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/http/resource.go b/http/resource.go index 9fe4caa6..0a8da271 100644 --- a/http/resource.go +++ b/http/resource.go @@ -280,6 +280,12 @@ func writeFile(afs afero.Fs, dst string, in io.Reader, fileMode, dirMode fs.File return nil, err } + // Sync the file to ensure all data is written to storage. + // to prevent file corruption. + if err := file.Sync(); err != nil { + return nil, err + } + // Gets the info about the file. info, err := file.Stat() if err != nil { diff --git a/http/tus_handlers.go b/http/tus_handlers.go index d11920ae..498d776f 100644 --- a/http/tus_handlers.go +++ b/http/tus_handlers.go @@ -256,6 +256,12 @@ func tusPatchHandler() handleFunc { return http.StatusInternalServerError, fmt.Errorf("could not write to file: %w", err) } + // Sync the file to ensure all data is written to storage + // to prevent file corruption. + if err := openFile.Sync(); err != nil { + return http.StatusInternalServerError, fmt.Errorf("could not sync file: %w", err) + } + newOffset := uploadOffset + bytesWritten w.Header().Set("Upload-Offset", strconv.FormatInt(newOffset, 10)) From 219582c0b03fd90979b1d1398dba7919d086a23f Mon Sep 17 00:00:00 2001 From: Ariel Leyva Date: Sat, 10 Jan 2026 03:31:27 -0500 Subject: [PATCH 2/2] fix: hide "change password form" in noauth setting (#5652) --- frontend/src/views/settings/Profile.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/settings/Profile.vue b/frontend/src/views/settings/Profile.vue index 328b2f1a..8aafccb6 100644 --- a/frontend/src/views/settings/Profile.vue +++ b/frontend/src/views/settings/Profile.vue @@ -44,7 +44,7 @@ -
+
import { useAuthStore } from "@/stores/auth"; import { useLayoutStore } from "@/stores/layout"; -import { users as api, settings } from "@/api"; +import { users as api } from "@/api"; import AceEditorTheme from "@/components/settings/AceEditorTheme.vue"; import Languages from "@/components/settings/Languages.vue"; import { computed, inject, onMounted, ref } from "vue"; import { useI18n } from "vue-i18n"; +import { authMethod, noAuth } from "@/utils/constants"; const layoutStore = useLayoutStore(); const authStore = useAuthStore(); @@ -142,7 +143,6 @@ onMounted(async () => { dateFormat.value = authStore.user.dateFormat; aceEditorTheme.value = authStore.user.aceEditorTheme; layoutStore.loading = false; - const { authMethod } = await settings.get(); isCurrentPasswordRequired.value = authMethod == "json"; return true;