feat(teambition): support s3 upload method (close #4365)

This commit is contained in:
Andy Hsu
2023-05-13 23:06:25 +08:00
parent 077a525961
commit 3c4c2ad4e0
4 changed files with 81 additions and 14 deletions

View File

@ -125,6 +125,9 @@ func (d *Teambition) Remove(ctx context.Context, obj model.Obj) error {
}
func (d *Teambition) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, up driver.UpdateProgress) error {
if d.UseS3UploadMethod {
return d.newUpload(ctx, dstDir, stream, up)
}
res, err := d.request("/api/v2/users/me", http.MethodGet, nil, nil)
if err != nil {
return err