title: Rest Controller: uploading file using HttpServletRequest through Swagger UI
body: <p>I wonder if it is possible to show the input file to select in my Swagger UI when exposing the API.
  I confirm that it is working perfectly when defining the endpoint as following:</p>
  <pre><code>public ResponseEntity&lt;String&gt; upload(@RequestPart MultipartFile file)
  </code></pre>
  <p>There is no doubt to show the file chooser when using <code>MultipartFile</code>.</p>
  <p><a href="https://i.stack.imgur.com/ZV9xt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZV9xt.png" alt="file chooser" /></a></p>
  <p>And as I would like to upload big files, I have to use <code>HttpServletRequest</code> instead in order to upload the file as a stream. The endpoint will be then like:</p>
  <pre><code>public @ResponseBody Response&lt;String&gt; upload(HttpServletRequest request) {
              // Create a new file upload handler
              ServletFileUpload upload = new ServletFileUpload();
              // Parse the request
              FileItemIterator iter = upload.getItemIterator(request);
              while (iter.hasNext()) {
                      FileItemStream item = iter.next();
                      String name = item.getFieldName();
                      InputStream stream = item.openStream();
                      if (!item.isFormField()) {
                              String filename = item.getName();
                              // Process the input stream
                              OutputStream out = new FileOutputStream(filename);
                              IOUtils.copy(stream, out);
                              stream.close();
                              out.close();
                      }
              }
              return new Response&lt;String&gt;(true, &quot;Success&quot;, &quot;&quot;);
  }
  </code></pre>
  <p>The endpoint is working well using a curl command. But unfortunately when using the Swagger UI, I am not able to show the file chooser. <br>
  Does anyone faced the same case or knows if Swagger supports this feature?</p>