From 90607aad7c4ffac6cb7f0d2e9e47cfdffac11646 Mon Sep 17 00:00:00 2001 From: keven1024 Date: Sun, 21 Dec 2025 17:52:23 +0800 Subject: [PATCH] feat(front): enhance FileUploadProgressView component to include chunk tracking for improved upload management --- front/components/Home/File/FileUploadProgressView.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/front/components/Home/File/FileUploadProgressView.vue b/front/components/Home/File/FileUploadProgressView.vue index 537f43a..dcdcdce 100644 --- a/front/components/Home/File/FileUploadProgressView.vue +++ b/front/components/Home/File/FileUploadProgressView.vue @@ -231,6 +231,7 @@ const handleCreate = async (fileId: string) => { id: string type: 'init' | 'already' chunk_size: number + chunks: number[] } }>('/api/file/create', { method: 'POST', @@ -240,10 +241,10 @@ const handleCreate = async (fileId: string) => { hash, }, }) - const { id, chunk_size, type: createType } = createData?.data || {} + const { id, chunk_size, type: createType, chunks } = createData?.data || {} uploadfile.id = id uploadfile.uploadInfo = { - chunks: {}, + chunks: Object.fromEntries(chunks.map((index: number) => [index - 1, { status: 'success', createdAt: dayjs().unix() }])), chunkLength: Math.ceil(size / chunk_size), ChunkSize: chunk_size, }