mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-08 04:18:06 +02:00
update post profile image
This commit is contained in:
parent
b040d89e5c
commit
230c54721d
1 changed files with 5 additions and 0 deletions
|
@ -100,6 +100,11 @@ namespace Jellyfin.Api.Controllers
|
||||||
// Handle image/png; charset=utf-8
|
// Handle image/png; charset=utf-8
|
||||||
var mimeType = Request.ContentType.Split(';').FirstOrDefault();
|
var mimeType = Request.ContentType.Split(';').FirstOrDefault();
|
||||||
var userDataPath = Path.Combine(_serverConfigurationManager.ApplicationPaths.UserConfigurationDirectoryPath, user.Username);
|
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)));
|
user.ProfileImage = new Data.Entities.ImageInfo(Path.Combine(userDataPath, "profile" + MimeTypes.ToExtension(mimeType)));
|
||||||
|
|
||||||
await _providerManager
|
await _providerManager
|
||||||
|
|
Loading…
Reference in a new issue