Page MenuHomePhabricator

Display number of total files uploaded on Special:MediaStatistics
Closed, ResolvedPublic

Description

As a wiki user, I want to know the number of total files, not aggregated by type.

If I go to, eg. https://commons.wikimedia.org/wiki/Special:MediaStatistics I can see very detailed status of the total size per section and category, as well as globally, but I cannot get the global total of files, nor the number of files per category.

I believe this number is available, as I can see it on https://commons.wikimedia.org/wiki/Special:Statistics (uploaded files) or could be calculated on the fly by just adding the previous data. Maybe there is a reason the number of total files is not displayed? If there is not, this could be just a UI issue?

While working on T264189, it would be nice to have such a value to perform a sanity check, even if highly cached. It feels weird we have the exact data size total, but not the number of files?

Researching a bit, based on source code of SpecialMediaStatistics.php, adding '(WITH) ROLLUP' to the query (for MySQL and postgres) it would have it for free, or just a UNION.

I tried to see if there was an API call for this, but I couldn't find one.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This is not a serious blocker, but maybe it could be an "easy" task for a newcomer, assuming people are ok with it?

On Special:MediaStatistics I found this: All files: Total file size for all files: 291,770,164,782,919 bytes (265.36 TB).

I'm not sure (really) what exactly you want.

I'm not sure (really) what exactly you want.

That's the "Total file size", not the number of individual files.

From title and first line of description:

As a wiki user, I want to know the number of total files, not aggregated by type.

So, you want to "full number" of uploaded files be available and on Special:MediaStatistics, right?

Change 716044 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] specials: Add number of files per section to Special:MediaStatistics

https://gerrit.wikimedia.org/r/716044

Change 716044 merged by jenkins-bot:

[mediawiki/core@master] specials: Add number of files per section to Special:MediaStatistics

https://gerrit.wikimedia.org/r/716044

Umherirrender claimed this task.
Umherirrender triaged this task as Lowest priority.