diff --git a/controllers/profile/UpdatePhotoProfile.go b/controllers/profile/UpdatePhotoProfile.go index 06a0c60..16a7bd1 100644 --- a/controllers/profile/UpdatePhotoProfile.go +++ b/controllers/profile/UpdatePhotoProfile.go @@ -124,6 +124,8 @@ func UpdatePhotoProfile(c *gin.Context, router *gin.RouterGroup) { } }() + wg.Wait() + file, err := os.Open(path) if err != nil { c.JSON(http.StatusBadRequest, gin.H{