✅ Content would exceed Content-Length
I have this code to add files to an
The problem I have, is that I am getting the error
HttpClient to send API requests to an external API.The problem I have, is that I am getting the error
Unable to write content to request stream; content would exceed Content-Length. Now, in some cases, the automated Content-Length value being set was incorrect. I have tried manually setting the content length with streamContent.Headers.ContentLength = fileStream.Length and while this does correctly set the size, I still get the same error that it would exceed the length. I'm not sure why that's occurring.