Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5074

Improvement for MockHttpServletRequest and FormTester to support 'multiple' input type of fileUpload

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 6.6.0
    • 6.7.0
    • wicket
    • None

    Description

      Right now MockHttpServletRequest keeps a Map<String, UploadedFile> uploadedFiles to simulate the uploads, but that only covers multiple FileUploadFields in the Page(each holding a single upload file).
      When doing MockHttpServletRequest.addFile(...), it does not add the file to a list, but rather replaces the last one:
      uploadedFiles.put(fieldName, uf);

      However with the HTML5 type of input type multiple="multiple", FileUploadField.getFileUploads() returns list of uploaded files, so I guess that MockHttpServletRequest should honor this and keep the files into Map<String, List<UploadedFile>>.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            balamaci Serban Balamaci
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: