While attempting to upload a file through a put call, I encountered an issue with the Content Range not matching the total number of bytes specified by the API. When I tried to manually set the content length, I received an error stating "Refused to set unsafe header 'Content-Length'".
The exact error I encountered during file upload is as follows:
{
"error": {
"code": "invalidRequest",
"message": "The Content-Range header length does not match the provided number of bytes."
}
}
Interestingly, the Content Length is accepted and the call is successful when made through Postman. However, when attempting the API call within a web application, this issue arises. Any suggestions on how to resolve this problem would be greatly appreciated.