feat: support cancel for some drivers (close #2717)

This commit is contained in:
Noah Hsu
2022-12-21 15:03:09 +08:00
parent e4a88a7c13
commit 105f22969c
31 changed files with 118 additions and 129 deletions

View File

@ -137,7 +137,7 @@ func (d *Onedrive) Remove(ctx context.Context, obj model.Obj) error {
func (d *Onedrive) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error {
var err error
if stream.GetSize() <= 4*1024*1024 {
err = d.upSmall(dstDir, stream)
err = d.upSmall(ctx, dstDir, stream)
} else {
err = d.upBig(ctx, dstDir, stream, up)
}