Project

General

Profile

Actions

dev #1376

open

[BUG] : Show Correct File Size (MB/KB) with Proper Unit in Homepage Validation Text

Added by Ayat Rahman over 1 year ago. Updated over 1 year ago.

Status:
Complete
Priority:
High
Assignee:
Target version:
Start date:
12/05/2024
Due date:
12/05/2024 (about 16 months late)
% Done:

100%

Estimated time:
3:00 h
Spent time:

Description

Description:
The homepage validation text currently displays the file size in KB but appends the text "MB" at the end, which is incorrect. The file size should be properly displayed in either MB or KB, depending on the value, and the correct unit should be used.

Steps to Reproduce:

  1. Open the homepage where the validation text is displayed.
  2. Observe the file size (it is displayed in KB, but with the text "MB" appended).
  3. The value should be correctly displayed as either MB or KB, depending on the size.

Expected Behavior:

  • File sizes should be dynamically displayed as MB or KB based on the value, not hardcoded to "MB".
    • For example, if the file size is below 1024 KB, it should show in KB.
    • If the file size is above 1024 KB, it should be converted and shown in MB.

Current Behavior:
The file size is always displayed in KB, but the text "MB" is hardcoded at the end, even when the value should be displayed in KB.

Possible Solution:

  • Implement logic to check the file size.
    • If the size is greater than 1024 KB, convert to MB and show "MB".
    • If the size is less than 1024 KB, show in KB with "KB".
  • Ensure the unit text (MB/KB) dynamically matches the value.
Actions

Also available in: Atom PDF