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

setting getApplicationSettings().setDefaultMaximumUploadSize() has no effect

    XMLWordPrintableJSON

    Details

      Description

      I am creating an Google Appspot - Wicket application and want to allow users to upload a file. This file can be upto 15MB, since Google uses a limited JRE it is not possible to create Files.

      When setting DefaultMaximumUploadSize to 15MB nothing changes, Appspot still throws a SecurityException. Wicket is not really using the DefaultMaximumUploadSize setting at all, it is passed along the multipart handling but not used. The DiskFileItemFactory is not receiving the DefaultMaximumUploadSize and sticks to a default value of 10240.

      I am unable to make a patch file at the moment, can make one later if need be. Here is the required change:

      MultipartServletWebRequestImpl.java:90 is currently:

      this(request, filterPrefix, maxSize, upload, new DiskFileItemFactory(Application.get().getResourceSettings().getFileCleaner()));

      and it should be:

      this(request, filterPrefix, maxSize, upload, new DiskFileItemFactory(maxSize, null, Application.get().getResourceSettings().getFileCleaner()));

        Attachments

          Activity

            People

            • Assignee:
              svenmeier Sven Meier
              Reporter:
              hielkehoeve Hielke Hoeve
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified