Skip to content

Commit e566315

Browse files
committed
1
1 parent 72e9289 commit e566315

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/teldrive/upload.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func (d *Teldrive) doSingleUpload(ctx context.Context, dstDir model.Obj, file mo
165165
digits := len(strconv.Itoa(chunkCnt))
166166
return file.GetName() + fmt.Sprintf(".%0*d", digits, 1)
167167
}(),
168-
"partNo": strconv.Itoa(1),
168+
"partNo": strconv.Itoa(chunkCnt),
169169
"fileName": file.GetName(),
170170
}
171171
req.SetQueryParams(uploadParams)
@@ -185,7 +185,7 @@ func (d *Teldrive) doSingleUpload(ctx context.Context, dstDir model.Obj, file mo
185185
if filePart.Name != "" {
186186
fileParts = append(fileParts, *filePart)
187187
uploaded += curChunkSize
188-
up(float64(uploaded) / float64(totalSize))
188+
up(float64(uploaded) / float64(totalSize) * 100)
189189
ss.FreeSectionReader(rd)
190190
} else {
191191
// For common situation this code won't reach

0 commit comments

Comments
 (0)