diff --git a/Kyoo/Views/API/AccountAPI.cs b/Kyoo/Views/API/AccountAPI.cs index 3d9caf26..e937ebfb 100644 --- a/Kyoo/Views/API/AccountAPI.cs +++ b/Kyoo/Views/API/AccountAPI.cs @@ -31,11 +31,11 @@ namespace Kyoo.Api public class AccountData { - [FromQuery(Name = "email")] + [FromForm(Name = "email")] public string Email { get; set; } - [FromQuery(Name = "username")] + [FromForm(Name = "username")] public string Username { get; set; } - [FromQuery(Name = "picture")] + [FromForm(Name = "picture")] public IFormFile Picture { get; set; } } @@ -116,7 +116,10 @@ namespace Kyoo.Api User user = await _userManager.FindByNameAsync(username); if (user == null) return BadRequest(); - return new PhysicalFileResult(Path.Combine(_picturePath, user.Id), "image/png"); + string path = Path.Combine(_picturePath, user.Id); + if (!System.IO.File.Exists(path)) + return NotFound(); + return new PhysicalFileResult(path, "image"); } [HttpPost("update")] diff --git a/Kyoo/Views/WebClient b/Kyoo/Views/WebClient index 044132d4..54f9406c 160000 --- a/Kyoo/Views/WebClient +++ b/Kyoo/Views/WebClient @@ -1 +1 @@ -Subproject commit 044132d4bf052f61c99186258e9aaf6da571b4ca +Subproject commit 54f9406c079894648b9a84a63aa7944c8d439ce4