diff --git a/drivers/teambition/driver.go b/drivers/teambition/driver.go index 0949aad1..a2189d24 100644 --- a/drivers/teambition/driver.go +++ b/drivers/teambition/driver.go @@ -273,8 +273,8 @@ func (driver Teambition) Upload(file *model.FileStream, account *model.Account) newFile, err = driver.upload(file, token, account) } else { // chunk upload - err = base.ErrNotImplement - //newFile, err = driver.chunkUpload(file, token, account) + //err = base.ErrNotImplement + newFile, err = driver.chunkUpload(file, token, account) } if err != nil { return err diff --git a/drivers/teambition/teambition.go b/drivers/teambition/teambition.go index ccf68cda..a1996985 100644 --- a/drivers/teambition/teambition.go +++ b/drivers/teambition/teambition.go @@ -209,6 +209,13 @@ func (driver Teambition) chunkUpload(file *model.FileStream, token string, accou return nil, err } } + res, err := base.RestyClient.R().SetHeader("Authorization", token).Post( + fmt.Sprintf("https://%s.teambition.net/upload/chunk/%s", + prefix, newChunk.FileKey)) + log.Debug(res.Status(), res.String()) + if err != nil { + return nil, err + } return &newChunk.FileUpload, nil }