Skip to content

Commit

Permalink
[Change] changin the avatar path
Browse files Browse the repository at this point in the history
  • Loading branch information
nobir committed Jul 20, 2022
1 parent fa4b55d commit e0af711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Controllers/DashboardController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit e0af711

Please sign in to comment.