Remove redundant check for already uploaded block in UploadBlock function.

This commit is contained in:
2025-07-10 11:11:36 +08:00
parent 7b065406cc
commit 747f76991d

View File

@@ -126,9 +126,6 @@ func UploadBlock(uid uint, fid uint, index int, data []byte) error {
if index < 0 || index >= uploadingFile.BlocksCount() {
return model.NewRequestError("block index is not correct")
}
if uploadingFile.Blocks[index] {
return model.NewRequestError("block already uploaded")
}
path := filepath.Join(uploadingFile.TempPath, strconv.Itoa(index))
if err := os.WriteFile(path, data, os.ModePerm); err != nil {