dd
Size: a a a
dd
dd
SG
dd
dd
dd
e
e
e
ВГ
АА
e
e
public async Task<FeedbackResult> SendFeedback(string topicId, FeedbackUserInfo userInfo, byte []photoFile = null, CancellationToken cancellationToken = default(CancellationToken))
{
var multipartFormData = new MultipartFormDataContent();
var topicIdContent = new StringContent(topicId);
multipartFormData.Add(topicIdContent, "topicId");
var userInfoContent = new StringContent(JsonConvert.SerializeObject(userInfo), System.Text.Encoding.UTF8, "application/json");
multipartFormData.Add(userInfoContent, "userInfo");
var tokenContent = new StringContent(ApiSettings.ApiToken);
multipartFormData.Add(tokenContent, "token");
if (photoFile != null)
{
var fileContent = new ByteArrayContent(photoFile);
fileContent.Headers.Add("Content-Disposition", "form-data; name=\"file\"; filename=\"photo.jpg\"");
fileContent.Headers.Add("Content-Type", "image/jpeg");
multipartFormData.Add(fileContent);
}
return await Post<FeedbackResult>($"{ApiSettings.Host}{FEEDBACK_URL}", multipartFormData, cancellationToken: cancellationToken);
}
e
АА
e
АА
e
e
АА