feat: upload

This commit is contained in:
Rogee
2025-01-15 10:43:16 +08:00
parent 9bfdf0e0ea
commit ab827715fb
16 changed files with 378 additions and 161 deletions

View File

@@ -15,6 +15,7 @@ import SparkMD5 from 'spark-md5';
import { ref } from 'vue';
const CHUNK_SIZE = 2 * 1024 * 1024; // 2MB chunks
const MAX_CONCURRENT_UPLOADS = 4; // Changed from 3 to 4
const progress = ref(0);
const status = ref('');
@@ -68,7 +69,6 @@ const calculateFileMD5 = async (file) => {
});
};
const MAX_CONCURRENT_UPLOADS = 3;
const uploadChunks = async (chunks, file, fileMD5) => {
const pending = [...Array(chunks.length).keys()];