Subscribe Join 180,000+ subscribers and receive articles from our blog about software quality, testing, QA and security. Subscribe

Add attachment to result with Postman

Hi there!
I am trying to add attachment to test result through Postman, but I receive error

    "error": "No file attached or upload size was exceeded."

My curl looks like this:

curl --location --request POST '' \

--header 'Authorization: Basic xxxx=' \

--header 'Content-Type: multipart/form-data' \

--header 'Cookie: tr_session=7f7fd4b3-cc7f-4001-a0cb-d981413a2521' \

--data-binary '@/D:/icon.png'

So basically I chose “binary” in body type and choose file from the folder and it does not work.
I am trying to make the same through the Java code with HttpClient and get the same error each time.

Please assist in completing this request at least in Postman.