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 72956feb26
commit 3e19b0a6aa

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
}