From 721c47a74bac566746ce6aa744a2a486737c121b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=93=E3=81=91=E3=81=A3=E3=81=A1?= Date: Mon, 21 Mar 2022 19:28:22 +0900 Subject: [PATCH] fix: reject mp4 --- packages/client/src/scripts/select-file-enc.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/client/src/scripts/select-file-enc.ts b/packages/client/src/scripts/select-file-enc.ts index eae57aa00..54b2c87fa 100644 --- a/packages/client/src/scripts/select-file-enc.ts +++ b/packages/client/src/scripts/select-file-enc.ts @@ -96,8 +96,16 @@ function select(src: any, label: string | null, multiple: boolean): Promise { - if (file.type.indexOf('video') == -1) { - os.toast('It is not video file'); + if (file.type.indexOf('video/mp4') == -1) { + os.toast('It is mp4 file'); + os.upload(file, defaultStore.state.uploadFolder).then(driveFiles => { + res(driveFiles); + }).catch(e => { + os.alert({ + type: 'error', + text: e + }); + }); return }