API to return all user uploads
Open, Needs TriagePublic

Description

MediaWiki should have an API option to return all user uploads - which includes all files uploaded by user, with their current file titles, and not depending on the fact if the most recent file version is uploaded by this user or another.

Currently there exists only options to return:

  • all 'logged' user uploads (including deleted files) - api.php?action=query&list=logevents&letype=upload&leuser=USERNAME
  • all user uploads where the most recent version of the file is uploaded by our user. This does not include files that don't exist. - api.php?action=query&list=allimages&aiuser=USERNAME&aisort=timestamp
XXN created this task.Jan 3 2017, 8:34 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 3 2017, 8:34 PM
XXN updated the task description. (Show Details)Jan 3 2017, 8:35 PM
XXN updated the task description. (Show Details)Jan 3 2017, 8:38 PM
Anomie added a subscriber: Anomie.Jan 3 2017, 9:20 PM

This would need some thought as to what exactly that means in terms of database queries, and would probably be significantly affected by tasks such as T589: RFC: image and oldimage tables and T96384: Integrate file revisions with description page history.

What's the problem with "all 'logged' user uploads"? Just that you have to filter out deleted files on the client side?

This would need some thought as to what exactly that means in terms of database queries, and would probably be significantly affected by tasks such as T589: RFC: image and oldimage tables and T96384: Integrate file revisions with description page history.

What's the problem with "all 'logged' user uploads"? Just that you have to filter out deleted files on the client side?

I guess not only deleted files, but also renamed files, which are still present somewhere but the reference from the upload log is broken because points to the original name. There's also user contributions to the file namespace, which include also edits on that namespace, include deleted file revisions, but preserve filenames in case of moves.

XXN added a comment.Jan 3 2017, 11:41 PM

What's the problem with "all 'logged' user uploads"? Just that you have to filter out deleted files on the client side?

Additionally to what Ciencia_Al_Poder said above, the logged list of uploaded files may cause some ugly issues, when one decides to work (with some automated editing tool) on someone's uploads, but he gets only the original file titles and meanwhile some of these were deleted/renamed and then under that name were reuploaded another files by another users. This is a real case, such things happens on Commons (due to the fact that lots of files are uploaded under some short bad names, then are deleted, then under those names are uploaded [absolutely] different files by another users). A local Commons tool, VisualFileChange, is for long time dependent of this deficiency.[ 1] [ 2]