Skip to content

Commit

Permalink
fix(pikpak): upload empty file (close #1452)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Sep 10, 2022
1 parent 56219bf commit f483659
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/pikpak/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ func (d *PikPak) Put(ctx context.Context, dstDir model.Obj, stream model.FileStr
if err != nil {
return err
}
if stream.GetSize() == 0 {
log.Debugln(string(res))
return nil
}
params := jsoniter.Get(res, "resumable").Get("params")
endpoint := params.Get("endpoint").ToString()
endpointS := strings.Split(endpoint, ".")
Expand Down

0 comments on commit f483659

Please sign in to comment.