Issue
If the web content article size is more than 256 KB. It shows "Please enter content with valid content size no longer than 256KB" on UI.
Environment
- Portal 6.2
- Liferay DXP 7.0 - 7.4
Resolution
For Liferay 6.2-7.3
Please add the below property in portal-ext.properties to create content with more than 256 KB. By default, the value is set to 256 KB.
# Set the threshold size to prevent extraneous serialization of uploaded
# data.
#
com.liferay.portal.upload.LiferayFileItem.threshold.size=262144
For Liferay DXP 7.4:
Below is the property you need to add in the portal-ext.properties:
# Set the threshold size to prevent extraneous serialization of uploaded
# data.
#
# Env: LIFERAY_COM_PERIOD_LIFERAY_PERIOD_PORTAL_PERIOD_KERNEL_PERIOD_UPLOAD_PERIOD__UPPERCASEF_ILE_UPPERCASEI_TEM_PERIOD_THRESHOLD_PERIOD_SIZE
#
com.liferay.portal.kernel.upload.FileItem.threshold.size=1048576
Please Note: You need to increase the value 262144 i.e. 256 KB, to the value as per your business requirement. For DXP 7.4 the value by default is 1 MB and you can increase as per your requirements.
Additional Information
- For file upload sizes, it can also be set through the UI
- You may also need to adjust the maxInputSize attribute in AntiSamy (see this article on AntiSamy for more details)
- Notes:
- If you increase the size of the content by raising the upper limit, the server may run out of memory.
- Some browsers may not be able to handle large requests and an error may occur.