From 42497b70839758e7d4b3d15fd6af5917296016bb Mon Sep 17 00:00:00 2001 From: a835100635 Date: Tue, 2 Mar 2021 23:28:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E6=8D=A2=E7=AE=97=E9=94=99=E8=AF=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/upload-video.html | 2 +- src/menus/video/upload-video.ts | 2 +- test/unit/menus/video/upload-video.test.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/upload-video.html b/examples/upload-video.html index 22dd2e1..6786613 100644 --- a/examples/upload-video.html +++ b/examples/upload-video.html @@ -55,7 +55,7 @@ editor.config.uploadVideoAccept = ['mp4']; // 上传视频的最大体积,默认 1024M - editor.config.uploadVideoMaxSize = 1 * 1024 * 1024 * 1024; + editor.config.uploadVideoMaxSize = 1 * 1024 * 1024; // 自定义上传视频的名称 editor.config.uploadVideoName = ''; diff --git a/src/menus/video/upload-video.ts b/src/menus/video/upload-video.ts index fcb4fdb..800005e 100644 --- a/src/menus/video/upload-video.ts +++ b/src/menus/video/upload-video.ts @@ -49,7 +49,7 @@ class UploadVideo { let uploadVideoServer = config.uploadVideoServer // 上传视频的最大体积,默认 1024M const maxSize = config.uploadVideoMaxSize - const uploadVideoMaxSize = maxSize / 1024 / 1024 + const uploadVideoMaxSize = maxSize / 1024 // 一次最多上传多少个视频 // const uploadVideoMaxLength = config.uploadVideoMaxLength // 自定义上传视频的名称 diff --git a/test/unit/menus/video/upload-video.test.ts b/test/unit/menus/video/upload-video.test.ts index bda80f2..2d4f655 100644 --- a/test/unit/menus/video/upload-video.test.ts +++ b/test/unit/menus/video/upload-video.test.ts @@ -172,7 +172,7 @@ describe('upload video', () => { const upload = createUploadVideoInstance({ uploadVideoServer, - uploadVideoMaxSize: 5 * 1024 * 1024, + uploadVideoMaxSize: 5 * 1024, customAlert: fn, })