🎇 delete cache
This commit is contained in:
parent
78f81ddc3b
commit
ff91d7a37d
@ -377,6 +377,9 @@ func (driver AliDrive) Upload(file *model.FileStream, account *model.Account) er
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if !parentFile.IsDir() {
|
||||||
|
return base.ErrNotFolder
|
||||||
|
}
|
||||||
var resp UploadResp
|
var resp UploadResp
|
||||||
var e AliRespError
|
var e AliRespError
|
||||||
partInfoList := make([]base.Json, 0)
|
partInfoList := make([]base.Json, 0)
|
||||||
@ -471,6 +474,7 @@ func (driver AliDrive) Upload(file *model.FileStream, account *model.Account) er
|
|||||||
return fmt.Errorf("%s", e.Message)
|
return fmt.Errorf("%s", e.Message)
|
||||||
}
|
}
|
||||||
if resp2["file_id"] == resp.FileId {
|
if resp2["file_id"] == resp.FileId {
|
||||||
|
_ = base.DeleteCache(file.ParentPath, account)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return fmt.Errorf("%+v", resp2)
|
return fmt.Errorf("%+v", resp2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user