Force SHA1 hashing on updated hash files
This commit is contained in:
@@ -434,8 +434,10 @@ public partial class EditProfileUi
|
||||
try
|
||||
{
|
||||
var fileContent = await File.ReadAllBytesAsync(filePath).ConfigureAwait(false);
|
||||
await using var stream = new MemoryStream(fileContent);
|
||||
var format = await Image.DetectFormatAsync(stream).ConfigureAwait(false);
|
||||
var stream = new MemoryStream(fileContent);
|
||||
await using (stream.ConfigureAwait(false))
|
||||
{
|
||||
var format = await Image.DetectFormatAsync(stream).ConfigureAwait(false);
|
||||
if (!IsSupportedImageFormat(format))
|
||||
{
|
||||
_showProfileImageError = true;
|
||||
@@ -461,6 +463,7 @@ public partial class EditProfileUi
|
||||
_showProfileImageError = false;
|
||||
_queuedProfileImage = fileContent;
|
||||
Mediator.Publish(new ClearProfileGroupDataMessage(_groupInfo.Group));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user