title: Spring Multipart File upload under Pojo
body: <p>Hi All I need help for <code>Multi-Part File Upload under the POJO class</code>. I'm using Swagger Image for Uploading the  List File's. When I run my code it show the request pattern as <code>JSON</code> instead of File Button </p>
  
  <p>Class POJO :-</p>
  
  <pre><code>public class User {
  
      static final long serialVersionUID = 1L;
  
      @ApiModelProperty(notes = "The database generated user, token and session mapping ID.")
      private Long id;
  
      @ApiModelProperty(notes = "user name")
      private String username;
  
      @ApiModelProperty(notes = "User password")
      private String password;
  
      @ApiModelProperty(notes = "Indicates whether the user is enabled or disabled. A disabled user cannot be authenticated.")
      private boolean enabled;
  
      @ApiModelProperty(notes = "Multiple file for user.", dataType = "java.io.File", required = true)
      private List&lt;MultipartFile&gt; multipartFiles;
  
  
  }
  </code></pre>
  
  <p>Rest-Controller :-</p>
  
  <pre><code>@ApiOperation(value = "Authenticated User Login", response = User.class)
  @RequestMapping(value = "/upload", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
  @ApiResponses(value = {
          @ApiResponse(code = 200, message = "Success", response = User.class),
          @ApiResponse(code = 401, message = "Unauthorized"),
          @ApiResponse(code = 403, message = "Forbidden"),
          @ApiResponse(code = 404, message = "Not Found"),
          @ApiResponse(code = 500, message = "Failure")})
  public ResponseEntity&lt;User&gt; fileUpload(@RequestBody User user) { return new ResponseEntity(user, HttpStatus.OK); 
  }
  </code></pre>
  
  <p>SwaggerConfig :-</p>
  
  <pre><code>@Configuration
  @EnableSwagger2
  public class SwaggerConfig {
  
      @Bean
      public Docket productApi() {
  
          return new Docket(DocumentationType.SWAGGER_2)
                  .select().apis(RequestHandlerSelectors.any())
                  .paths(PathSelectors.any()).build().apiInfo(apiInfo());
      }
  
      private ApiInfo apiInfo() {
          return new ApiInfoBuilder().title("Authentication API").description("")
                  .termsOfServiceUrl("https://www.example.com/api")
                  .contact(new Contact("Developers", "https://projects.spring.io/spring-boot/", ""))
                  .license("Open Source")
                  .licenseUrl("\"https://www.apache.org/licenses/LICENSE-2.0")
                  .version("1.0.0")
                  .build();
  
      }
  
  }
  </code></pre>
  
  <p>Swagger Show :-</p>
  
  <pre><code>{
    "enabled": false,
    "id": 0,
    "multipartFiles": {
      "absolute": true,
      "absolutePath": "string",
      "canonicalPath": "string",
      "directory": true,
      "executable": true,
      "file": true,
      "freeSpace": 0,
      "hidden": true,
      "lastModified": 0,
      "name": "string",
      "parent": "string",
      "path": "string",
      "readable": true,
      "totalSpace": 0,
      "usableSpace": 0,
      "writable": true
    },
    "password": "string",
    "username": "string"
  }
  </code></pre>
  
  <p>My Question is how i upload <code>List of File's</code> through Swagger under <code>POJO class</code> </p>