Browse Source

fix upload file

LinkLeong 2 năm trước cách đây
mục cha
commit
46a37f0510
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      pkg/utils/file/file.go

+ 1 - 1
pkg/utils/file/file.go

@@ -377,7 +377,7 @@ func SpliceFiles(dir, path string, length int, startPoint int) error {
 
 	// todo: here should have a goroutine to remove each partial file after it is read, to save disk space
 
-	for i := 0; i < length+startPoint; i++ {
+	for i := 0; i < length+startPoint-1; i++ {
 		data, err := ioutil.ReadFile(dir + "/" + strconv.Itoa(i+startPoint))
 		if err != nil {
 			return err