title: Wiremock : how to upload file to folder __files with API
body: <p>the documentation of wiremock says that we can mock a a request that retrieve a file thanks to this code :</p>
  
  <p><code>{
      "request": {
          "method": "GET",
          "url": "/body-file"
      },
      "response": {
          "status": 200,
          "bodyFileName": "path/to/myfile.xml"
      }
  }</code></p>
  
  <p>But now I have to find a way to reaaly upload the file other wise I have 500 error on the request.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/&gt;
      &lt;title&gt;Error 500 &lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h2&gt;HTTP ERROR: 500&lt;/h2&gt;
      &lt;p&gt;Problem accessing /body-file. Reason:
  
          &lt;pre&gt;    java.lang.RuntimeException: java.io.FileNotFoundException: /wiremock-standalone/./__files/path/to/myfile.xml (No such file or directory)&lt;/pre&gt;
      &lt;/p&gt;
      &lt;hr /&gt;
      &lt;i&gt;
          &lt;small&gt;Powered by Jetty://&lt;/small&gt;
      &lt;/i&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>Precision : I cannot upload the file directly due to our infrastructure constraints.</p>