feat(onedrive): customize chunk size (close #1927)

This commit is contained in:
Noah Hsu
2022-10-08 22:23:33 +08:00
parent dcaaae366b
commit 30f992c6a8
3 changed files with 5 additions and 1 deletions

View File

@ -166,7 +166,7 @@ func (d *Onedrive) upBig(ctx context.Context, dstDir model.Obj, stream model.Fil
}
uploadUrl := jsoniter.Get(res, "uploadUrl").ToString()
var finish int64 = 0
const DEFAULT = 100 * 1024 * 1024
DEFAULT := d.ChunkSize * 1024 * 1024
for finish < stream.GetSize() {
if utils.IsCanceled(ctx) {
return ctx.Err()