Skip to content

Commit

Permalink
fix(aliyundrive): upload empty file
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Sep 11, 2022
1 parent 969018d commit 68a6a0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/aliyundrive/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ func (d *AliDrive) Put(ctx context.Context, dstDir model.Obj, stream model.FileS
return err
}
res.Body.Close()
up(i * 100 / count)
if count > 0 {
up(i * 100 / count)
}
}
var resp2 base.Json
_, err, e = d.request("https://api.aliyundrive.com/v2/file/complete", http.MethodPost, func(req *resty.Request) {
Expand Down

0 comments on commit 68a6a0c

Please sign in to comment.