Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-57103

LAR files that larger than 2GB is broken as only 2GB of it is downloading.

    Details

      Description

      Steps to reproduce
      1) Upload several big files (e.g: video files) into Document Library (overall size must be 3-4GB)
      2) Go to Control Panel > Manage Liferay > Content > Documents and Media
      3) Select to Export Documents and Media
      4) Wait while the export process finishes

      Expected result: When the export finished and the downloadable .LAR file is seen in the table, it should be able to download with the same size as it has in the parenthesis.

      Actual result: Only 2GB will be saved.

      Please note, that the Content-Length header reports 2GB as well.

      The issue is caused by LPS-44255 and it can be fixed in ServletResponseUtil

      The problem is that HttpServletResponse.setContentLength() requires an int as a length, but that's not big enough in this case. So instead of

      response.setContentLength(contentLength);
      

      We should still use:

      response.setHeader(HttpHeaders.CONTENT_LENGTH, String.valueOf(contentLength));
      

      Please note that for write() method we incorrectly pass contentLength as int as well!

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 7 weeks, 6 days ago

                  Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M7