perf: modify onedrive upload chunk size (#1831 close #1790)

improve onedrive upload speed
pull/1853/head
hdm9527 2022-09-27 20:29:54 +08:00 committed by GitHub
parent 9d2e9887af
commit 4e13b1a83c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 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 = 4 * 1024 * 1024
const DEFAULT = 100 * 1024 * 1024
for finish < stream.GetSize() {
if utils.IsCanceled(ctx) {
return ctx.Err()