Search code examples
javaapirest-assuredtestrail

Testrail Java API: Unable to attach report to testrun


API endpoint:

[POST] https:///{{testrail link}}/index.php?/api/v2/add_attachment_to_run/449

Headers: { "Content-Type","value":"multipart/form-data" }

In body I am passing Key : attachment and value: path of file. PFA screenshot of the same.

The error right now on Postman : { "error": "No file attached or upload size was exceeded." }

The upload size is just fine (under 256 MB)enter image description here


Solution

  • Change attachment to type File, not Text.

    enter image description here