Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-14357

[GSS](7.1.z) UNDERTOW-1325 - Servlet MultipartConfig attribute file-size-threshold not working

XMLWordPrintable

    • Hide

      I used JBoss Developer Studio, but any IDE can be used to stop the application to check if the file is being written on disk or not

      • Open the IDE;
      • Import the maven project attached (undertowupload);
      • Update the location path in web.xml with a valid path for you;
      • Put a breakpoint on 'read()' method of UploadImageBean class;
      • Deploy the application on EAP running in debug mode inside the IDE;
      • Access the page using http://localhost:8080/undertowupload-1.0;
      • Upload any file with less than 10mb;
      • After the debugger being triggered, check the location defined on web.xml if the file was created;
      Show
      I used JBoss Developer Studio, but any IDE can be used to stop the application to check if the file is being written on disk or not Open the IDE; Import the maven project attached (undertowupload); Update the location path in web.xml with a valid path for you; Put a breakpoint on 'read()' method of UploadImageBean class; Deploy the application on EAP running in debug mode inside the IDE; Access the page using http://localhost:8080/undertowupload-1.0 ; Upload any file with less than 10mb; After the debugger being triggered, check the location defined on web.xml if the file was created;

      It's not working the file-size-threshold attribute from MultipartConfig in Servlet 3 to not write the uploaded file on disk until it reaches that size.

      It writes on disk even with the file size being lower than the threshold. This should not be happening as the documentation says:

            spyrkob Bartosz Spyrko-Smietanko
            rhn-support-aferreir Arthur Ferreira
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: