Page MenuHomePhabricator

File description displays wrong size
Closed, InvalidPublic

Description

Hi, On
https://commons.wikimedia.org/wiki/File:Stained_glass_window_at_the_16th_Street_Baptist_Church_in_Birmingham.jpg (below see File history)
the file description says that after moving the file, the size is 1 Gb, although the size is 1.71 MB.
The size before moving is wrong too. It says 52.45Kb.


Version: wmf-deployment
Severity: normal

Details

Reference
bz68035

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:32 AM
bzimport set Reference to bz68035.
bzimport added a subscriber: Unknown Object (MLST).

That's plain wikitext. Maybe an issue with BetacommandBot?

This is an ancient edit. I dont have any logs/records on this anymore. However I suspect that it was a bug in my calculations for file size. I was exactly 1 magnitude larger than it should have been.

Please explain how this is invalid? How the BetacommandBot could add a wrong file size?

Its invalid as this isnt an issue with mediawiki/wikimedia and rather an issue with one of my old scripts.

The API provides file size in bytes. See https://commons.wikimedia.org/w/api.php?action=query&titles=File:Stained_glass_window_at_the_16th_Street_Baptist_Church_in_Birmingham.jpg&prop=imageinfo&iiprop=timestamp|user|size&format=jsonfm

In this case the API returned 1793980 which for most humans doesnt make much sense. I ran a custom conversion to get the Kb/Mb/Gb values. In this particular case I was exactly 1 magnitude (Mb/Gb) off. I suspect it was an error in the conversion equation that I was using that caused what you noted and that I had swaped the Mb suffix with the Gb suffix.

OK, thanks for the explanation.
The most important is, can it be corrected? either

  1. directly; 2. by moving the file again (to preserve the history); 3. last there is still the option to delete and reupload.