Skip to content

Commit

Permalink
fix(quark): download file size limit (close #4140)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Apr 14, 2023
1 parent 46f9aef commit c5f6a90
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/quark/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,20 @@ func (d *Quark) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (
"fids": []string{file.GetID()},
}
var resp DownResp
ua := "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) quark-cloud-drive/2.5.20 Chrome/100.0.4896.160 Electron/18.3.5.4-b478491100 Safari/537.36 Channel/pckk_other_ch"
_, err := d.request("/file/download", http.MethodPost, func(req *resty.Request) {
req.SetBody(data)
req.SetHeader("User-Agent", ua).
SetBody(data)
}, &resp)
if err != nil {
return nil, err
}
return &model.Link{
URL: resp.Data[0].DownloadUrl,
Header: http.Header{
"Cookie": []string{d.Cookie},
"Referer": []string{"https://pan.quark.cn"},
"Cookie": []string{d.Cookie},
"Referer": []string{"https://pan.quark.cn"},
"User-Agent": []string{ua},
},
}, nil
}
Expand Down

0 comments on commit c5f6a90

Please sign in to comment.