diff options
| author | crobibero <cody@robibe.ro> | 2020-07-21 08:05:21 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-07-21 08:05:21 -0600 |
| commit | 230c54721db3c4f9110a8db778265a788644cabc (patch) | |
| tree | 473ed7ecf5d345593edce4dc888977fa718995e4 /Jellyfin.Api/Controllers/ImageController.cs | |
| parent | b040d89e5cda3d49ecb45e5441053dc61872f272 (diff) | |
update post profile image
Diffstat (limited to 'Jellyfin.Api/Controllers/ImageController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/ImageController.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Jellyfin.Api/Controllers/ImageController.cs b/Jellyfin.Api/Controllers/ImageController.cs index c24c5e24c..1322d77e9 100644 --- a/Jellyfin.Api/Controllers/ImageController.cs +++ b/Jellyfin.Api/Controllers/ImageController.cs @@ -100,6 +100,11 @@ namespace Jellyfin.Api.Controllers // Handle image/png; charset=utf-8 var mimeType = Request.ContentType.Split(';').FirstOrDefault(); var userDataPath = Path.Combine(_serverConfigurationManager.ApplicationPaths.UserConfigurationDirectoryPath, user.Username); + if (user.ProfileImage != null) + { + _userManager.ClearProfileImage(user); + } + user.ProfileImage = new Data.Entities.ImageInfo(Path.Combine(userDataPath, "profile" + MimeTypes.ToExtension(mimeType))); await _providerManager |
