Go to Jira Administration → System → Advanced - Attachments
In that menu, increase the limit value to upload attachments, according to the size of attachment that is being uploaded
Example:
This is not related to the Xray REST API.
Link for the related documentation
Test Execution#ImportExecutionTestResults