fix: save upload info after every chunk
This commit is contained in:
parent
96ac75bf3f
commit
038d2c440b
|
@ -156,6 +156,12 @@ func (upload *fileUpload) WriteChunk(ctx context.Context, offset int64, src io.R
|
|||
n, err := io.Copy(file, src)
|
||||
|
||||
upload.info.Offset += n
|
||||
|
||||
err = upload.writeInfo()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return n, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue