From 24cf9be6ae0e7ec32fe03fdf6da291302045bcdc Mon Sep 17 00:00:00 2001 From: Shady Nagy Date: Tue, 28 Jul 2020 23:33:21 +0200 Subject: [PATCH] Fix unit test SavePicture function (#435) --- src/Infrastructure/Services/WebFileSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Infrastructure/Services/WebFileSystem.cs b/src/Infrastructure/Services/WebFileSystem.cs index d2f9ed5..d60a653 100644 --- a/src/Infrastructure/Services/WebFileSystem.cs +++ b/src/Infrastructure/Services/WebFileSystem.cs @@ -24,7 +24,7 @@ namespace Microsoft.eShopWeb.Infrastructure.Services public async Task SavePicture(string pictureName, string pictureBase64) { - if (!await UploadFile(pictureName, Convert.FromBase64String(pictureBase64))) + if (string.IsNullOrEmpty(pictureBase64) || !await UploadFile(pictureName, Convert.FromBase64String(pictureBase64))) { return false; }