Issue
- Setting the limit of file versions to file following the article, however there are still more than 5 versions are available in Documents and Media :
- https://help.liferay.com/hc/en-us/articles/8309859165325-I-want-to-limit-content-versions-in-documents-and-media - (It is confirmed that updating existing files, removes prior versions.)
Environment
- DXP 7.0+
Resolution
-
Version A:
- It can be resolved with the utilization of Groovy Script
- A way to create such a script would probably be to adapt the one, Liferay made for removing old web content versions:
Example: Removing Intermediate Journal Article Versions.
- The script sorts all articles by version in ascending order and also allows a certain number to be kept.
-
Version B:
- Following the article shared on the Liferay Developer Community page: How to clean previous version of documents from Document and Media
- Be advised, however, this script removes all other versions other than the latest one
Contenido exclusivo para suscriptores.
Una Suscripción Enterprise de Liferay proporciona acceso a más de 1.500 artículos que incluyen las mejores practicas, diagnóstico de problemas y otras soluciones útiles. Inicia sesión para tener un acceso completo.
Inicia sesión