🎇 use tempFile to cal md5

This commit is contained in:
微凉
2022-01-27 23:48:29 +08:00
parent bf9aa5c3d3
commit b797f4302c
5 changed files with 78 additions and 7 deletions

View File

@ -5,6 +5,7 @@ import (
"github.com/Xhofe/alist/model"
"github.com/Xhofe/alist/utils"
log "github.com/sirupsen/logrus"
"runtime/debug"
)
func MakeDir(driver base.Driver, account *model.Account, path string, clearCache bool) error {
@ -78,5 +79,6 @@ func Upload(driver base.Driver, account *model.Account, file *model.FileStream,
if err != nil {
log.Errorf("upload error: %s", err.Error())
}
debug.FreeOSMemory()
return err
}