Reputation: 11
I'm getting an error when I try to add a large document to Watson Discovery using .Net SDK. The problem ocurrs when the file is larger than 11MB. I've tried to add the same document on more than one Environment and Collection. When the file is smaller than 11MB the code below works perfectly.
Code:
byte[] content = File.ReadAllBytes(@"D:\test\A17_FlightPlan.pdf");
using (MemoryStream ms = new MemoryStream(content))
{
try
{
var document = discoveryService.AddDocument(
environmentid,
collectionid,
ms,
"A17_FlightPlan.pdf",
"application/pdf",
null);
}
catch (Exception ex)
{
Console.Write(ex.ToString());
}
}
Error: {"The API query failed with status code InternalServerError: INKApi Error | x-global-transaction-id: | error: "}
Upvotes: 0
Views: 50
Reputation: 11
The problem was the internet proxy configured on the my develop machine. It must have some request size limitation. I've changed to another proxy and it worked.
Upvotes: 1