Skip to content

Commit

Permalink
fix(discovery-v2): change fileContent from ByteArrayContent to Stream…
Browse files Browse the repository at this point in the history
…Content
  • Loading branch information
kevinkowa committed Dec 4, 2020
1 parent f82ef5a commit b6d5d70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IBM.Watson.Discovery.v2/DiscoveryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,7 @@ public DetailedResponse<AnalyzedDocument> AnalyzeDocument(string projectId, stri

if (file != null)
{
var fileContent = new ByteArrayContent(file.ToArray());
var fileContent = new StreamContent(file);
System.Net.Http.Headers.MediaTypeHeaderValue contentType;
System.Net.Http.Headers.MediaTypeHeaderValue.TryParse(fileContentType, out contentType);
fileContent.Headers.ContentType = contentType;
Expand Down

0 comments on commit b6d5d70

Please sign in to comment.