legacy-knowledge-base
公開されました Jul. 2, 2025

256KBを超えるサイズのWebコンテンツを作成できません

written-by

Ankit Gupta

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

learn-legacy-article-disclaimer-text

問題

Webコンテンツの記事サイズが256KB以上の場合、UIに "256KB以下のサイズでコンテンツを入力してください。" と表示されます。

Web_Content_Error.jpg

環境

  • Portal 6.2
  • Liferay DXP 7.0 - 7.4

解決

Liferay 6.2-7.3の場合:

256KB以上のコンテンツを作成するには、portal-ext.propertiesに以下のプロパティを追加してください。 デフォルトでは256KBに設定されています。

    # Set the threshold size to prevent extraneous serialization of uploaded
   # data.
   # com.liferay.portal.upload.LiferayFileItem.threshold.size=262144

Liferay DXP 7.4の場合:

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

 

注:262144(256KB)の値を、お客様のビジネス要件に合わせて増やしていただく必要があります。DXP 7.4の場合、デフォルトでは1MBに設定されていますので、必要に応じて増やすことができます。

追加情報

  • ファイルのアップロードサイズは、UIからも設定できます。
  • また、AntiSamy の maxInputSize 属性を調整する必要がある場合もあります。(詳細はAntiSamy のこちらの記事をご参照ください。)
  • 注意事項:
    • 上限値を上げてコンテンツのサイズを大きくした場合、サーバーのメモリ不足になる可能性があります。
    • ブラウザによっては、大きなリクエストを処理できず、エラーが発生することがあります。
did-this-article-resolve-your-issue

legacy-knowledge-base