Browse Source

Fix unit test SavePicture function (#435)

main
Shady Nagy 5 years ago
committed by GitHub
parent
commit
24cf9be6ae
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Infrastructure/Services/WebFileSystem.cs

2
src/Infrastructure/Services/WebFileSystem.cs

@ -24,7 +24,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Services
public async Task<bool> SavePicture(string pictureName, string pictureBase64)
{
if (!await UploadFile(pictureName, Convert.FromBase64String(pictureBase64)))
if (string.IsNullOrEmpty(pictureBase64) || !await UploadFile(pictureName, Convert.FromBase64String(pictureBase64)))
{
return false;
}

Loading…
Cancel
Save