fix: save upload info after every chunk

This commit is contained in:
Derrick Hammer 2023-05-23 20:15:49 -04:00
parent 96ac75bf3f
commit 038d2c440b
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 0 deletions

View File

@ -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
}