1
0
mirror of https://github.com/labstack/echo.git synced 2025-03-21 21:27:04 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-04-08 15:00:45 -07:00
parent c1177e54f2
commit 7905fbd667

View File

@ -152,11 +152,11 @@ func save(c echo.Context) error {
defer src.Close()
// Destination
file, err := os.Create(file.Filename)
dst, err := os.Create(avatar.Filename)
if err != nil {
return err
}
defer file.Close()
defer dst.Close()
// Copy
if _, err = io.Copy(dst, src); err != nil {