Skip to content

Commit

Permalink
Renamed private field name (dotnet-architecture#535)
Browse files Browse the repository at this point in the history
Conditional statement is to compare the file data length when it is more than a specific size, to the private filed was renamed from "ImageMinimumBytes" to "ImageMaximumBytes".
  • Loading branch information
sayedmhussein authored May 27, 2021
1 parent 15bd78e commit 9251940
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/BlazorShared/Models/CatalogItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class CatalogItem
public string PictureBase64 { get; set; }
public string PictureName { get; set; }

private const int ImageMinimumBytes = 512000;
private const int ImageMaximumBytes = 512000;

public static string IsValidImage(string pictureName, string pictureBase64)
{
Expand All @@ -47,7 +47,7 @@ public static string IsValidImage(string pictureName, string pictureBase64)
return "File length is 0!";
}

if (fileData.Length > ImageMinimumBytes)
if (fileData.Length > ImageMaximumBytes)
{
return "Maximum length is 512KB";
}
Expand Down

0 comments on commit 9251940

Please sign in to comment.