Extension:FileApi

Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:AGPL licensed extensions
MediaWiki extensions manual
FileApi
Release status: unknownCategory:Extensions with invalid status
Implementation API Category:API extensions
Description Implements file downloads via the action api for consumption by any client, including api-only clients (e. g. via bot password or OAuth).
Author(s) (Simon Stiertalk)
Latest version 0.1.0
MediaWiki 1.39Category:Extensions with manual MediaWiki version
Database changes No
License GNU Affero General Public License 3.0 or later
Download Category:Extensions in GitHub version control
Read Me
Category:All extensionsCategory:Extensions not in ExtensionJson

Implements file downloads via the action api for consumption by any client, including api-only clients (e. g. via bot password or OAuth).

Installation

  • Download and place the file(s) in a directory called FileApi in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'FileApi' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Endpoints

action=download

Params:

  • title: The title of the file page
  • pageid: The pageid of the file page
  • format: The result format if an error occurs (ApiBase error message)

Example

https://my.wiki.com/w/api.php?action=download&format=json&title=File:SomeFile.png

See also

Category:OpenSemanticLab
Category:AGPL licensed extensions Category:API extensions Category:All extensions Category:Extensions in GitHub version control Category:Extensions not in ExtensionJson Category:Extensions with invalid status Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:OpenSemanticLab