Browse Source

Renamed private field name (#535)

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".
main
Sayed M. Hussein 5 years ago
committed by GitHub
parent
commit
9251940529
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/BlazorShared/Models/CatalogItem.cs

4
src/BlazorShared/Models/CatalogItem.cs

@ -32,7 +32,7 @@ namespace BlazorShared.Models
public string PictureBase64 { get; set; } public string PictureBase64 { get; set; }
public string PictureName { 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) public static string IsValidImage(string pictureName, string pictureBase64)
{ {
@ -47,7 +47,7 @@ namespace BlazorShared.Models
return "File length is 0!"; return "File length is 0!";
} }
if (fileData.Length > ImageMinimumBytes) if (fileData.Length > ImageMaximumBytes)
{ {
return "Maximum length is 512KB"; return "Maximum length is 512KB";
} }

Loading…
Cancel
Save