Forum Discussion

AAB's avatar
Regular Contributor
3 years ago

ReadyAPI send binary file doesn't work


I've tried to add a fille to a POST Request but it seems that I have no luck. I've followed the information from the documentation but it still isn't working. 

What am I doing wrong?

For starters, this teststep was executed as a simple xml project, not a composite project.

1) the Requet should contain this:

file: ${#Project#pathDir}\Share a document with ITP.docx
fileName:Share a document with ITP.docx
tag:test cu to ITP

MediaType = mulitpart/form-data

Token of the user

2) when I send it like this I receive a "client.technical.malformed" error message. The Raw Request looks like this:




2) Then I tried according the documentation:



Like you see I'm getting an HTTP500

the Raw Request is slidely different though:



How can I solve this please?


Thanks in advance,

Kind regards,




5 Replies

  • nmrao's avatar
    Champion Level 3
    Is "$" missing below?
    >>file: "{pathDir}\\Share a document with ITP.docx"
    • AAB's avatar
      Regular Contributor

      Hi nmrao thanks for your response.

      Well actually: no, I don't think so as I use the whole path there. should that be exactly as the path in the value? Is there a difference?


      Kind regards,


    • AAB's avatar
      Regular Contributor

      nmrao I adapted the paths equally but no success:


      and the RAW request looks like this:


       thanks in advance,

      kind regards, 



      • richie's avatar
        Community Hero
        Hey AAB,

        I had a lot of trouble using this multipart type when i last tried about 3 years ago,but i did get it working eventually (with forum help), so i'll dig through my posts to find an answer.

        Btw. This will probably make no difference, but i always try and minimise any issues. I notice you have spaces in the name of your attachment file. I would remove these,or i would percent/html encode them as thefilename appears in your payload and HTTP requests require percent encoding for any special,non-alpha numeric chars. Just a suggestion,