From bb67923fa8eb051eca75203b83837210245926f8 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 29 Jan 2022 18:53:36 +0900 Subject: [PATCH] make keepOriginal to follow setting value --- packages/client/src/os.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/client/src/os.ts b/packages/client/src/os.ts index a8d1f933d..95b4e87a1 100644 --- a/packages/client/src/os.ts +++ b/packages/client/src/os.ts @@ -10,6 +10,7 @@ import MkWaitingDialog from '@/components/waiting-dialog.vue'; import { MenuItem } from '@/types/menu'; import { resolve } from '@/router'; import { $i } from '@/account'; +import { defaultStore } from '@/store'; export const pendingApiRequestsCount = ref(0); @@ -542,7 +543,7 @@ export const uploads = ref<{ img: string; }[]>([]); -export function upload(file: File, folder?: any, name?: string, keepOriginal?: boolean): Promise { +export function upload(file: File, folder?: any, name?: string, keepOriginal: boolean = defaultStore.state.keepOriginalUploading): Promise { if (folder && typeof folder == 'object') folder = folder.id; return new Promise((resolve, reject) => {