Page MenuHomePhabricator

Add a way to determine if local file uploads are allowed via the MediaWiki API
Closed, ResolvedPublic

Description

On Wikidata uploads aren't allowed but I couldn't find a way to determine this via the API.

For example the siteinfo property general returns a filesize larger than zero and the fileextensions list valid extensions.

One way to have the filesize return 0 (or negative) if uploads are disabled or let fileextensions return an empty list or introduce a new property.


Version: 1.24rc
Severity: enhancement

Details

Reference
bz70075
Related Changes in Gerrit:

Event Timeline

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

(In reply to Fabian from comment #0)

One way to have the filesize return 0 (or negative) if uploads are disabled
or let fileextensions return an empty list or introduce a new property.

A new property would be best: I'd recommend something like "uploadsenabled" which reflects the value of $wgEnableUploads, unless the situation is more complicated than that.

TTO subscribed.

A nice easy one for a #GCI2015 student. I'll mentor this.

Change 257921 had a related patch set uploaded (by Georggi199):
Added a way to check if uploads are enabled

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

Change 257921 merged by jenkins-bot:
ApiSiteInfo: Added a way to check if uploads are enabled

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