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

Publishing fileentry fails when dl.webdav.save.to.single.version is true and dl.file.max.size is set to a non 0 value

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • Affects Version/s: 6.0.2 RC, 6.0.6 GA
    • Fix Version/s: None
    • Component/s: Documents & Media
    • Labels:
      None

      Description

      The unlockResource method in DLWebDAVStorageImpl throws a FileSizeException when dl.webdav.save.to.single.version is set to true and dl.file.max.size is set to a non 0 value

      The problem is that the publishFileEntry method in DLWebDAVStorageImpl executes the following line

      DLFileEntryLocalServiceUtil.updateFileEntry(
      latestFileVersion.getUserId(), latestFileVersion.getGroupId(),
      latestFileVersion.getFolderId(), latestFileVersion.getFolderId(),
      latestFileVersion.getName(), fileEntry.getTitle(),
      fileEntry.getTitle(), fileEntry.getDescription(),
      latestFileVersion.getDescription(), true,
      fileEntry.getExtraSettings(), null, 0, serviceContext);

      Note that it passes in null for the input stream

      Later in DLLocalServiceImpl the following code is executed

      public void validate(
      String fileName, boolean validateFileExtension, InputStream is)
      throws PortalException, SystemException {

      if ((PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE) > 0) &&
      ((is == null) ||
      (is.available() >
      PrefsPropsUtil.getLong(PropsKeys.DL_FILE_MAX_SIZE))))

      { throw new FileSizeException(fileName); }

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            jelmer Jelmer Kuperus (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              9 years, 38 weeks, 3 days ago

                Packages

                Version Package