make keepOriginal to follow setting value

This commit is contained in:
tamaina 2022-01-29 18:53:36 +09:00
parent 8da8329b51
commit bb67923fa8

View file

@ -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<Misskey.entities.DriveFile> {
export function upload(file: File, folder?: any, name?: string, keepOriginal: boolean = defaultStore.state.keepOriginalUploading): Promise<Misskey.entities.DriveFile> {
if (folder && typeof folder == 'object') folder = folder.id;
return new Promise((resolve, reject) => {