🔥 Optimize 189 cloud get client

This commit is contained in:
微凉
2022-01-16 16:05:32 +08:00
parent 07d6ca27db
commit e952f1c243
2 changed files with 22 additions and 7 deletions

View File

@ -349,9 +349,9 @@ func (driver Cloud189) Upload(file *model.FileStream, account *model.Account) er
if file == nil {
return base.ErrEmptyFile
}
client, ok := client189Map[account.Name]
if !ok {
return fmt.Errorf("can't find [%s] client", account.Name)
client, err := driver.getClient(account)
if err != nil {
return err
}
parentFile, err := driver.File(file.ParentPath, account)
if err != nil {