improve onedrive upload speed
This commit is contained in:
parent
9d2e9887af
commit
4e13b1a83c
@ -166,7 +166,7 @@ func (d *Onedrive) upBig(ctx context.Context, dstDir model.Obj, stream model.Fil
|
|||||||
}
|
}
|
||||||
uploadUrl := jsoniter.Get(res, "uploadUrl").ToString()
|
uploadUrl := jsoniter.Get(res, "uploadUrl").ToString()
|
||||||
var finish int64 = 0
|
var finish int64 = 0
|
||||||
const DEFAULT = 4 * 1024 * 1024
|
const DEFAULT = 100 * 1024 * 1024
|
||||||
for finish < stream.GetSize() {
|
for finish < stream.GetSize() {
|
||||||
if utils.IsCanceled(ctx) {
|
if utils.IsCanceled(ctx) {
|
||||||
return ctx.Err()
|
return ctx.Err()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user