Page MenuHomePhabricator

Display number of total files uploaded on Special:MediaStatistics
Open, Needs TriagePublic

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

jcrespo created this task.Oct 23 2020, 12:39 PM
Restricted Application added a project: Structured-Data-Backlog. · View Herald TranscriptOct 23 2020, 12:39 PM
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?

Kizule added a subscriber: Kizule.Oct 24 2020, 5:13 PM

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.

Kizule added a comment.EditedOct 25 2020, 3:08 PM

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

Dinoguy1000 updated the task description. (Show Details)Thu, Nov 26, 10:16 PM