🎇 Multiple file upload

This commit is contained in:
微凉
2022-01-08 21:29:00 +08:00
parent 925f386bed
commit 2b97882b42
2 changed files with 29 additions and 20 deletions

View File

@ -51,6 +51,9 @@ func Delete(driver base.Driver, account *model.Account, path string, clearCache
}
func Upload(driver base.Driver, account *model.Account, file *model.FileStream, clearCache bool) error {
defer func() {
_ = file.Close()
}()
err := driver.Upload(file, account)
if err == nil && clearCache {
_ = base.DeleteCache(file.ParentPath, account)