Skip to content

Commit

Permalink
Fix form content payload
Browse files Browse the repository at this point in the history
  • Loading branch information
jakublabno committed Jan 9, 2025
1 parent f4c93b3 commit d14c64e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions smsapi/NativeHttpClientHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ private static HttpContent ConvertRequestDataToHttpContent(
streamContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data")
{
Name = "\"file\"",
FileName = "\"abc\""
FileName = "\"file\""
};

var content = new MultipartFormDataContent
{
streamContent
};

foreach (var keyValuePair in collection) content.Add(new StringContent(keyValuePair.Value), keyValuePair.Key);
foreach (var keyValuePair in collection) content.Add(new StringContent(keyValuePair.Value?.ToString()), keyValuePair.Key);

return content;
}
Expand Down

0 comments on commit d14c64e

Please sign in to comment.