Page MenuHomePhabricator

Enable $wgCopyUploadsFromSpecialUpload on Wikimedia Commons
Closed, ResolvedPublic

Description

Wikimedia Commons already allows uploading files via URL - used by GLAM Wiki Toolset, Upload Wizard / Flickr and API.

As this feature is restricted to a small group of trusted users - Image Reviewers, GWToolset Users and Administrators - I'd like to ask if the feature could be made available for Special:Upload.

Background:
I do a lot of video uploads which are > 100 MB and I (also other users) never got chunked uploads to work. I do have set up a server and upgraded my home internet line for moving video files to Commons. The URL is already whitelisted and I do have the upload_by_url right. For batch upload like videos from European Parliament or Bundestag I can use the API. But I also often have single files that need to be moved to Commons which make it more complicated if I have to go through a script and do the upload via API, eg. the Lila Tretikov video we did while travelling in Zürich (in this case a dev which was at the Hackathon took care of the upload but normally I do not have access to such people - see the many requests I have already filed to ask devs to upload files for me).

So is there any good reason to not activate this feature?


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz71897

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:44 AM
bzimport set Reference to bz71897.
bzimport added a subscriber: Unknown Object (MLST).

Please start a discussion about this on the village pump etc.

Noting that this was once enabled at testwiki (gerrit change 33217) and was later removed (why?).

note that this has already been discussed (and approved) on Commons in 2012 and lead to the activation of "upload_by_url" via the API:

https://commons.wikimedia.org/wiki/Commons:Village_pump/Proposals/Archive/2012/11#Upload_by_URL

The discussion talks about activating the feature in general, not whether it should be available via API or Special:Upload.

Just to be sure I started a seperate discussion:

https://commons.wikimedia.org/wiki/Commons:Village_pump/Proposals#Upload_by_URL_also_on_Special:Upload

I think the proposal can be counted as successful as several days no new comments were made and with one exception - which doesn't indicate a clear opinion - all commenters in the end approved the change.

Specification:

  • $wgCopyUploadsFromSpecialUpload should be set to 'true'
  • server whitelist will be kept in place as of today
  • user privileges (only 'Image Reviewer', 'GWToolset Users' and 'sysops' can use this feature) will be kept in place as of today

Is there any comment from the tech department? Can this be implemented?

It's been a while since I've messed with that code, but I don't think there's any reason we would object to turning it on from a technical point of view. We have a proxy service running to handle the actual uploads (url-downloader.wikimedia.org) and I'm pretty sure it enforces the whitelist no matter where you're uploading from (Special:Upload, UploadWizard, API), so my suggestion would be to turn it on on test.wiki, make sure it still works, and then try it on Commons. Keep in mind the whitelist on test.wiki is limited to flickr and upload.wikimedia.org.

Change 166964 had a related patch set uploaded by Glaisher:
Enable wgCopyUploadsFromSpecialUpload on testwiki

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

Change 166964 merged by jenkins-bot:
Enable wgCopyUploadsFromSpecialUpload on testwiki

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

and failing for files from upload.wikimedia.org with a 403 error

(In reply to Glaisher from comment #9)

and failing for files from upload.wikimedia.org with a 403 error

I believe the various upload from elsewhere on the internet features are not allowed to access Wikimedia servers. For example, upload by url also cannot access labs (bug 68264).

Which wiki may do an URL upload from which servers can be checked here:

https://noc.wikimedia.org/conf/highlight.php?file=InitialiseSettings.php

Search for "wgCopyUploadsDomains".

So the testwiki can only URL upload from upload.wikimedia.org and the defaults (*.flickr.com, *.staticflickr.com) so far.

I tested the URL upload on testwiki via Special:Upload:

This problem is on upload.wikimedia.org and has nothing to do with this feature we are discussing here.

Also, uploading from URL is already active on Commons (and testwiki), we are only discussing to get the actual form field added to the upload form, instead of having to run a bot just to make the API call to initiate the URL upload.

So I am saying the test was successful (if other want they may check why upload.wikimedia.org issues a 403 error, but that's a totally different story) and I would be happy if we could move forward and fix this bug by activating this feature on Commons.

(In reply to Steinsplitter from comment #12)

Proposal closed as SUCCESSFUL. Change can be merged.

no, there's not even an open proposed changeset. so can't be reviewed let alone merged.

(In reply to jeremyb from comment #13)

(In reply to Steinsplitter from comment #12)

Proposal closed as SUCCESSFUL. Change can be merged.

no, there's not even an open proposed changeset. so can't be reviewed let
alone merged.

someone need to upload a patch, logically. I changes therefore the status to new. Sorry, i am not native en speaker...

url-downloader can't access wikimedia.org subdomains only or is something else preventing it?

(In reply to Glaisher from comment #15)

url-downloader can't access wikimedia.org subdomains only or is something
else preventing it?

WM-proxy is blocking it because access to a domain in the cluster, This problem is on upload.wikimedia.org and has nothing to do with this feature we are discussing here (See [[Comment 11]]).

domain name is irrelevant AFAIK. proxy can't access any internal networks. can only fetch from outside WMF.

So we could safely enable this at commons?

Yes, I think we can go ahead and enable it on Commons, but I'm slightly concerned that the interface is going to be confusing to people if it only actually works for a small set of domain names. Perhaps we should file a new bug for improving the interface so that it's possible to discover which domains are supported.

Can't we deal with this by adding an explanation to a MediaWiki:Message? This is something a Commons admin can do.

Change 168908 had a related patch set uploaded by Kaldari:
Turning on $wgCopyUploadsFromSpecialUpload for Commons

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

Change 168908 merged by jenkins-bot:
Turning on $wgCopyUploadsFromSpecialUpload for Commons

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