Legacy Knowledge Base
Published Jul. 2, 2025

A new version file is created for each slight modifications

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

  • Is it possible to change the attribute of a file version without creating a new one?

Environment

  • Liferay DXP 7.0

Resolution

  • Document and Media Portlet is designed to create a new file version whenever a file attribute changes. 
  • Concerns with this design have been already raised, and some changes have been made in later Liferay DXP versions.
  • Administrators now have the opportunity to select the maximum number of versions to keep per file in Documents and Media, due to this new feature included in Liferay DXP 7.2. This indicates that the older versions will be removed if a new version is created. This can be set to 1 to keep only one (and the most latest) version of a file, with any alteration overwriting the file, even if only the metadata (such as the name or description) has changed.
  • Although the new configuration option introduced in Liferay DXP 7.2 still replaces the file even if only the metadata has been changed, this is how it has been designed.

Additional Information

  • Workaround for DXP Liferay 7.0: the DLFileEntryLocalServiceImpl class could be used as a starting point. A customized solution might check if the file has been changed during the update and only call the copyfileversion method if there is a difference.
Did this article resolve your issue ?

Legacy Knowledge Base