summaryrefslogtreecommitdiff
path: root/src/client/scripts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-07-13 23:30:12 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-07-13 23:30:12 +0900
commitb59a19c144e9e8c5273cf188f23462370f9b7288 (patch)
tree1cf647ab1d6e74f94d4a4e93ceec9315af2507b9 /src/client/scripts
parentResolve #6811 (diff)
downloadsharkey-b59a19c144e9e8c5273cf188f23462370f9b7288.tar.gz
sharkey-b59a19c144e9e8c5273cf188f23462370f9b7288.tar.bz2
sharkey-b59a19c144e9e8c5273cf188f23462370f9b7288.zip
Fix #7576
Diffstat (limited to 'src/client/scripts')
-rw-r--r--src/client/scripts/select-file.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/scripts/select-file.ts b/src/client/scripts/select-file.ts
index b8039fb670..9d7146e215 100644
--- a/src/client/scripts/select-file.ts
+++ b/src/client/scripts/select-file.ts
@@ -1,5 +1,6 @@
import * as os from '@client/os';
import { i18n } from '@client/i18n';
+import { defaultStore } from '@client/store';
export function selectFile(src: any, label: string | null, multiple = false) {
return new Promise((res, rej) => {
@@ -8,7 +9,7 @@ export function selectFile(src: any, label: string | null, multiple = false) {
input.type = 'file';
input.multiple = multiple;
input.onchange = () => {
- const promises = Array.from(input.files).map(file => os.upload(file));
+ const promises = Array.from(input.files).map(file => os.upload(file, defaultStore.state.uploadFolder));
Promise.all(promises).then(driveFiles => {
res(multiple ? driveFiles : driveFiles[0]);
@@ -57,6 +58,7 @@ export function selectFile(src: any, label: string | null, multiple = false) {
os.api('drive/files/upload-from-url', {
url: url,
+ folderId: defaultStore.state.uploadFolder,
marker
});