
Content-Length header can cause issues. Here's how you can approach this:Content-Length in Multipart RequestsThe Content-Length header must reflect the total byte size of the entire HTTP body, including:
This is not just the size of the binary file, but the entire formatted multipart body.
Content-Length (Workaround)Since Power Automate doesn’t expose the raw byte size of the full HTTP body, you can try this workaround:
Content-Length and send the request.If you must stay within Power Automate:
length(outputs('Get_file_content')) to get the binary size.Compose action to build the header:{
"Content-Length": "
}
⚠️ This is not precise, but may work if the API is lenient.
Ensure your Content-Type header is set to:
(or whatever boundary you're using)
Make sure the binary is passed as-is, not Base64-encoded unless the API expects it.
Use “Get file content using path” from SharePoint to ensure you get the binary stream.
🏷️ Tag me if you have any further questions or if the issue persists.
✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems.
❤️ Give it a Like if you found the approach useful in any way.