fix(baidu): custom upload part size (close #5757)

This commit is contained in:
Andy Hsu 2024-05-02 22:30:00 +08:00
parent 7bf5014417
commit 4cbbda8832
2 changed files with 13 additions and 9 deletions

View File

@ -17,6 +17,7 @@ type Addition struct {
AccessToken string
UploadThread string `json:"upload_thread" default:"3" help:"1<=thread<=32"`
UploadAPI string `json:"upload_api" default:"https://d.pcs.baidu.com"`
CustomUploadPartSize int64 `json:"custom_upload_part_size" default:"0" help:"0 for auto"`
}
var config = driver.Config{

View File

@ -249,6 +249,9 @@ const (
)
func (d *BaiduNetdisk) getSliceSize() int64 {
if d.CustomUploadPartSize != 0 {
return d.CustomUploadPartSize
}
switch d.vipType {
case 1:
return VipSliceSize