Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.1.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows xp
      tomcat 6
      jdk 1.6_04
    • Similar Issues:
      Show 5 results 

      Description

      In the sample apache sturts bridge the upload seems to not work as expected;

      when i upload a file the following code return a zero list items instead of one item:

      ServletFileUpload upload = new ServletFileUpload(factory);
      List items = upload.parseRequest(req);

        Issue Links

          Activity

          Hide
          Arcko Duan (Inactive) added a comment -

          Issue reproduced in portal trunk and plugin trunk.

          Show
          Arcko Duan (Inactive) added a comment - Issue reproduced in portal trunk and plugin trunk.
          Hide
          Christoph Hermann added a comment - - Restricted to

          I have the same problem. The Upload which worked fine in Liferay 4.4.1 is not working anymore in Liferay 5.0.1.
          Please provide a fix to this ASAP, this is really critical.

          The following code illustrates the problem:

          ------------
          DiskFileItemFactory factory = new DiskFileItemFactory();
          factory.setRepository(new File("/tmp/"));
          ServletFileUpload upload = new ServletFileUpload(factory);
          // Parse the request
          List<FileItem> items = (List<FileItem>) upload.parseRequest(httpRequest);
          if (items != null)

          { _log.debug("Found " + items.size() + " file items in the request"); }

          else

          { _log.debug("Found no file items in the request"); }

          ------------
          This always returns 0 items.

          See also http://support.liferay.com/browse/LEP-6479

          Show
          Christoph Hermann added a comment - - Restricted to I have the same problem. The Upload which worked fine in Liferay 4.4.1 is not working anymore in Liferay 5.0.1. Please provide a fix to this ASAP, this is really critical. The following code illustrates the problem: ------------ DiskFileItemFactory factory = new DiskFileItemFactory(); factory.setRepository(new File("/tmp/")); ServletFileUpload upload = new ServletFileUpload(factory); // Parse the request List<FileItem> items = (List<FileItem>) upload.parseRequest(httpRequest); if (items != null) { _log.debug("Found " + items.size() + " file items in the request"); } else { _log.debug("Found no file items in the request"); } ------------ This always returns 0 items. See also http://support.liferay.com/browse/LEP-6479
          Hide
          Marian Simpetru added a comment - - Restricted to

          Struts sample portlet – upload feture – also does not work on 5.1.1
          same issue since 4.4.2 code change i guess.
          this one affects any struts based portlet that tries to make uploads...

          console shows for struts sample portlet - upload:

          ERROR [UploadServletRequestImpl:111] the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null

          Show
          Marian Simpetru added a comment - - Restricted to Struts sample portlet – upload feture – also does not work on 5.1.1 same issue since 4.4.2 code change i guess. this one affects any struts based portlet that tries to make uploads... console shows for struts sample portlet - upload: ERROR [UploadServletRequestImpl:111] the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development

                  Subcomponents

                    Structure Helper Panel