Legacy Knowledge Base
Published Jun. 30, 2025

Documents and Media file extension restrictions don't apply to wiki attachments (mime type restrictions)

Written By

Sorin Pop

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

  • If I go to Control Panel/System Settings/Content and Data/Documents and Media/Service and in the File Extensions field I replace * with .jpg, in order to allow only jpg files to be added to Documents and Media.
  • And then I attach some other kind of file (e.g. a pdf, or png file) as an attachment to a wiki page (note that we didn't make any changes to the wiki allowed mime types at Control Panel/System Settings/Wiki/File Uploads/Allowed Wiki Attachment Mime Types, so by default, all mime types are allowed for wiki attachments)
  • The operation is successful and if you go to Documents and Media, you see that this png file was added there under the hidden com.liferay.wiki folder. (you need use dl.show.hidden.mount.folders=true in your portal-ext to see the hidden folder) 
  • Shouldn't this operation fail, because although Wiki settings allow all mime types, Documents and Media is restricted only to jpg files, and since this wiki attachment eventually ends up in Documents and Media (even though in a hidden folder), Documents and Media should have stopped it when sensing the non-jpg file?

Environment

  • 7.4 (probably earlier versions as well)

Resolution

  • This is not a bug, but the expected behavior.
    DL configuration is only applied to DM interface/service and not to other client apps: that's why each of them has a different configuration to its own repository.
     
  • As a side note, about the use of
    dl.show.hidden.mount.folders
    property to show those hidden folder: this is an administrative tool that allows to see all this repositories in the user interface but does not have any value about service use or configuration. In fact it is not recommended to use it to avoid users handle repositories using the web interface and break the contents by accident.

 

 

Did this article resolve your issue ?

Legacy Knowledge Base