refactor: file slice size

This commit is contained in:
Tristan Yang
2023-06-06 08:14:47 +08:00
parent d53167d734
commit 117875ffbf
2 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ const useUploadFile = (props?: IProps) => {
sliceUploadedCountRef.current = 0;
// setUploadingFile(true);
// 2MB
if (file_size <= 1000 * 1000 * 2) {
if (file_size <= FILE_SLICE_SIZE) {
// 一次性上传文件
uploadResult = await uploadChunk({ file_id, chunk: file, is_last: true });
sliceUploadedCountRef.current = 1;