Closed Bug 1869014 Opened 1 year ago Closed 1 year ago

Downloaded files drop-down shows wrong file sizes

Categories

(Firefox :: File Handling, defect)

Firefox 120
defect

Tracking

()

RESOLVED DUPLICATE of bug 106618
Tracking Status
firefox120 --- affected
firefox121 --- affected
firefox122 --- affected

People

(Reporter: meta, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:120.0) Gecko/20100101 Firefox/120.0

Steps to reproduce:

Downloaded a file that was 643,691,475 bytes.

Actual results:

Downloaded files drop-down showed the size as 614MB.

Expected results:

Drop down should have either shown the size as 614MiB, or as 644MB.

The latter would probably be preferable since disk sizes are in base 10 units. Of note, macOS Finder shows the file size correctly in base 10 units.

Hello, thank you for the bug report!
Unfortunately I could not reproduce your issue. Would you be so kind as to answer a few questions so we can investigate this further?

Moving the Component to ‘File Handling’. Please change if there’s a better fit, thank you.

Component: Untriaged → File Handling
Flags: needinfo?(meta)

OK, here's an example:

  1. Go to https://go.dev/dl/

  2. Click on the link to download go1.21.5.src.tar.gz.

  3. When the file has finished downloading, verify that it is 26,986,890 bytes in length.

  4. Click the download button in the Firefox toolbar to view the list of recently downloaded files, notice that Firefox says the file is 25.7MB.

The error is that the file is 25.7MiB, which is 27MB, but Firefox displays 25.7MB.

The fix would be for Firefox to either display 25.7MiB, or to display 27MB.

The problem still occurs with the latest Firefox nightly with a clean profile.

Flags: needinfo?(meta)

Thank you so much for the detailed STR, Matthew!
Reproducible using the steps mentioned in Comment 2 on:

  • Firefox Nightly 122.0a1;
  • Firefox RC1 121.0;
  • Firefox 120.0.1;

Tested and reproduced on:

  • Windows 10;
  • macOS 12;
  • Ubuntu 22;

Setting as NEW so the developing team can have a look.

Status: UNCONFIRMED → NEW
Ever confirmed: true

This is a long-standing decision and matches what the large majority of other browsers and OSes do. macOS and Safari have chosen to use base 10 but that doesn't match Windows and Linux behaviour in most cases. Making this a per-platform choice would mean that the same file shows different sizes on different platforms (with the same suffix, just to add confusion), so that's not an attractive solution. Showing MiB units would confuse most users so is also not something we'd consider. So although imperfect, we are not likely to change this.

For reference, there was recent related conversation in https://groups.google.com/a/mozilla.org/g/firefox-dev/c/QBzGs9-3QDw .

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 106618
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.