Merge branch 'master' into #5660/fix-Clicking-empty-background-does-not-deselect-files-(Mobile/Desktop)
This commit is contained in:
commit
696cbc9246
@ -44,7 +44,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="column">
|
<div v-if="!noAuth" class="column">
|
||||||
<form
|
<form
|
||||||
class="card"
|
class="card"
|
||||||
v-if="!authStore.user?.lockPassword"
|
v-if="!authStore.user?.lockPassword"
|
||||||
@ -96,11 +96,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAuthStore } from "@/stores/auth";
|
import { useAuthStore } from "@/stores/auth";
|
||||||
import { useLayoutStore } from "@/stores/layout";
|
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 AceEditorTheme from "@/components/settings/AceEditorTheme.vue";
|
||||||
import Languages from "@/components/settings/Languages.vue";
|
import Languages from "@/components/settings/Languages.vue";
|
||||||
import { computed, inject, onMounted, ref } from "vue";
|
import { computed, inject, onMounted, ref } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
|
import { authMethod, noAuth } from "@/utils/constants";
|
||||||
|
|
||||||
const layoutStore = useLayoutStore();
|
const layoutStore = useLayoutStore();
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
@ -142,7 +143,6 @@ onMounted(async () => {
|
|||||||
dateFormat.value = authStore.user.dateFormat;
|
dateFormat.value = authStore.user.dateFormat;
|
||||||
aceEditorTheme.value = authStore.user.aceEditorTheme;
|
aceEditorTheme.value = authStore.user.aceEditorTheme;
|
||||||
layoutStore.loading = false;
|
layoutStore.loading = false;
|
||||||
const { authMethod } = await settings.get();
|
|
||||||
isCurrentPasswordRequired.value = authMethod == "json";
|
isCurrentPasswordRequired.value = authMethod == "json";
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -280,6 +280,12 @@ func writeFile(afs afero.Fs, dst string, in io.Reader, fileMode, dirMode fs.File
|
|||||||
return nil, err
|
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.
|
// Gets the info about the file.
|
||||||
info, err := file.Stat()
|
info, err := file.Stat()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@ -256,6 +256,12 @@ func tusPatchHandler() handleFunc {
|
|||||||
return http.StatusInternalServerError, fmt.Errorf("could not write to file: %w", err)
|
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
|
newOffset := uploadOffset + bytesWritten
|
||||||
w.Header().Set("Upload-Offset", strconv.FormatInt(newOffset, 10))
|
w.Header().Set("Upload-Offset", strconv.FormatInt(newOffset, 10))
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user