From e0af7113e0d88b33c7088ff67c1eac50b8da6f17 Mon Sep 17 00:00:00 2001 From: Nobir Date: Wed, 20 Jul 2022 13:40:33 +0600 Subject: [PATCH] [Change] changin the avatar path --- Controllers/DashboardController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controllers/DashboardController.cs b/Controllers/DashboardController.cs index 4d153db..f9b9581 100644 --- a/Controllers/DashboardController.cs +++ b/Controllers/DashboardController.cs @@ -51,7 +51,7 @@ public ActionResult ProfilePicture(HttpPostedFileBase Avatar) var userId = ((User)Session["user"]).Id; var user = this.db.Users.Where(u => u.Id == userId).SingleOrDefault(); - user.Avatar = user.Username.ToString() + "." + Path.GetExtension(Avatar.FileName).Substring(1); + user.Avatar = "avatar/" + user.Username.ToString() + "." + Path.GetExtension(Avatar.FileName).Substring(1); this.db.SaveChanges();