Legacy Knowledge Base
Published Jun. 30, 2025

Uploading a file with multiple extensions

Written By

Kanchan Bisht

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • A multi-extension file is being uploaded via document and media
    Steps to reproduce:
    1) Startup the server
    2) Navigate to Control Panel>System Settings> Document and Media> Services> File Extension
    A file extension of * will allow all file extensions by default, however, if the user needs to restrict all types of uploads, they must add specific extensions. Here, to restrict other file types, .png, .jpg, and .txt have been added.
    3) Upload the attached [Font.zip.txt] file
    Observed Behavior: The portal appears to always accept the last extension of any type of file.
    If the .txt extension has been added, the file will be uploaded, however, if this extension is being removed, the file will not be uploaded.
    Expected Behavior: The file should not be uploaded since it has two extensions.

Environment

  • Liferay DXP 7.4

Resolution

  • The observed behavior is the expected behavior of the portal.
    • A file extension, also known as a file name extension, is the part of a file that helps operating systems determine the type of file. As a result, this feature's behavior is expected. Starting with the last dot, it specifies the file extension.
      test1.txt.mp4 > extension is mp4
      test2.txt.mp4.jpg > extension is jpg

Additional Information

  • If users are concerned about any breaches of this feature, they can enable the 'Antivirus Scanning for Uploaded Files', for more information, please see the following documentation: Enabling Antivirus Scanning for Uploaded Files

  • Users who have encountered such concerns, on the other hand, can always contact Liferay support via tickets and provide specific information. This may make it easier to identify this use case as a security risk, in which case the product team will take appropriate action. However, theoretically, it is simply not viable to reevaluate the DMS implemented feature.

Did this article resolve your issue ?

Legacy Knowledge Base