From cea2b486222e07a5fdc7e205ba196fa075f9db92 Mon Sep 17 00:00:00 2001 From: "Fischer, Louis" Date: Fri, 19 Feb 2021 09:10:17 -0600 Subject: [PATCH] SetMultipartFormDataRequestBody: logic error fix --- src/Cake.Http/HttpSettingsExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Cake.Http/HttpSettingsExtensions.cs b/src/Cake.Http/HttpSettingsExtensions.cs index d51a4d5..0e6efaf 100644 --- a/src/Cake.Http/HttpSettingsExtensions.cs +++ b/src/Cake.Http/HttpSettingsExtensions.cs @@ -328,7 +328,7 @@ public static HttpSettings SetMultipartFormDataRequestBody(this HttpSettings set if (filePaths != null && filePaths.Any()) { foreach (var filePath in filePaths) - if (filePath.Value != null && string.IsNullOrWhiteSpace(filePath.Key)) + if (filePath.Value != null && !string.IsNullOrWhiteSpace(filePath.Key)) multipart.Add(new StreamContent(File.OpenRead(filePath.Value.FullPath)), filePath.Key, filePath.Value.GetFilename().ToString()); }