Legacy Knowledge Base
Published Jun. 30, 2025

An error should appear immediately after uploading a file of wrong extension within the size limit

Written By

Rishabh Agrawal

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

  • When trying to upload a file in blogs that is less than the specified limit with the wrong extension, it shows the progress bar for a while and then gives the error.
  • Based on user experience, the error should appear immediately.

    Steps to reproduce:
    1. Navigate to System Settings --> Blogs --> File Uploads
    2. Change the Maximum Blogs Image Size to 50 MB (52428800)
    3. Navigate to Content & Data --> Blogs and create a new blog
    4. Drag and drop a file of wrong extension having size 40-49 MB. i.e. a large file but under the specified limit.

    Observed Behavior: Error is shown after showing a progress bar for a few moments depending on file size.
    Expected Behavior: Error message should appear immediately.

Environment

  • Liferay DXP [all versions]

Resolution

  1. As per the expected behavior of the product, the extension check is performed at the backend, therefore it has to be uploaded before checking it.
  2. Moreover, the other checks are performed on the front side for example: size validation.
Did this article resolve your issue ?

Legacy Knowledge Base