diff --git a/smsapi/NativeHttpClientHelper.cs b/smsapi/NativeHttpClientHelper.cs index d2a9aa4..970cdeb 100644 --- a/smsapi/NativeHttpClientHelper.cs +++ b/smsapi/NativeHttpClientHelper.cs @@ -75,7 +75,7 @@ private static HttpContent ConvertRequestDataToHttpContent( streamContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "\"file\"", - FileName = "\"abc\"" + FileName = "\"file\"" }; var content = new MultipartFormDataContent @@ -83,7 +83,7 @@ private static HttpContent ConvertRequestDataToHttpContent( 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; }