fix(backend): correctly hash images
This commit is contained in:
parent
a70078995b
commit
ff2ba1fb1b
3 changed files with 9 additions and 4 deletions
|
@ -31,7 +31,7 @@ public class UserAvatarUpdateInvocable(DatabaseContext db, ObjectStorageService
|
|||
|
||||
try
|
||||
{
|
||||
var image = await newAvatar.ConvertBase64UriToAvatar();
|
||||
var image = await newAvatar.ConvertBase64UriToImage(size: 512, crop: true);
|
||||
var hash = Convert.ToHexString(await SHA256.HashDataAsync(image)).ToLower();
|
||||
image.Seek(0, SeekOrigin.Begin);
|
||||
var prevHash = user.Avatar;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue