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

Cannot edit a DLFileEntry if using a restrictive value for dl.file.extensions due to FileExtensionException being incorrectly thrown

    Details

      Description

      Description
      Whenever you attempt to edit a document, the sourceFileName attribute that gets passed into the code is blank unless you have uploaded a new version of the file. This causes a FileEntryException to be thrown if you are using a value of the dl.file.extensions portal property other than the default value of *. This effectively makes it impossible to edit a document after it has initially been uploaded.

      Steps to Reproduce
      1. Add the following line to your portal-ext.properties file: dl.file.extensions=.bmp,.css,.doc,.docx,.dot,.gif,.gz,.htm,.html,.jpg,.js,.lar,.odb,.odf,.odg,.odp,.ods,.odt,.pdf,.png,.ppt,.pptx,.rtf,.swf,.sxc,.sxi,.sxw,.tar,.tiff,.tgz,.txt,.vsd,.xls,.xlsx,.xml,.zip,.jrxml,.mpg,.wmv,.flv,.avi,.mp4,.mov
      2. Start the portal
      3. Navigate to Content > Documents and Media
      4. Add a basic document and upload a .jpg
      5. Give the document a title and description
      6. Publish the document
      7. Edit the file and change the description
      8. Publish the document

      Expected Result: The document would publish
      Actual Result: Saving the document is unsuccessful and an error displays "Document names must end with one of the following extensions...."

      Reproduced in
      master (942c2b8c5447896c833712f56b6b5b699a8c2a85)
      ee-7.0.x (f5915d5395f8852f3660ea102d614118fb367c0f)

        Attachments

          Activity

            People

            • Assignee:
              sylvia.luan Sylvia Luan
              Reporter:
              michael.bowerman Michael Bowerman (Inactive)
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 40 weeks ago

                Packages

                Version Package
                7.0.0 DXP FP18
                7.0.3 CE GA4
                7.0.0 DXP SP4
                7.0.X EE
                7.1.X
                Master