feature upload remove all temp file

This commit is contained in:
Stone-afk 2023-01-11 21:41:18 +08:00 committed by Ming Deng
parent 109361078d
commit df32e9e2a8

View File

@ -693,6 +693,11 @@ func (c *Controller) SaveToFileWithBuffer(fromFile string, toFile string, buf []
defer dst.Close()
_, err = io.CopyBuffer(onlyWriter{dst}, src, buf)
if err != nil {
return err
}
err = c.Ctx.Request.MultipartForm.RemoveAll()
return err
}