fix: ensure file descriptors are closed + other bugs (#413)

This commit is contained in:
Alessandro (Ale) Segala
2025-04-04 01:04:36 -07:00
committed by GitHub
parent 980780e48b
commit 2f7646105e
6 changed files with 52 additions and 15 deletions

View File

@@ -250,6 +250,9 @@ func (uc *UserController) getUserProfilePictureHandler(c *gin.Context) {
_ = c.Error(err)
return
}
if picture != nil {
defer picture.Close()
}
c.Header("Cache-Control", "public, max-age=300")