Extension:WindowsAzureStorage

Category:Extensions without a compatibility policyCategory:GPL licensed extensions
MediaWiki extensions manual
WindowsAzureStorage
Release status: stableCategory:Stable extensions
Implementation File repositoryCategory:File repository extensions
Description Allows MediaWiki to use Windows Azure as the file backend
Author(s) Thai Phan, Markus Glaser
Latest version 1.2.0
MediaWiki >= 1.34.0
License GNU General Public License 2.0 or later
Download Category:Extensions in Wikimedia version control
Quarterly downloads 7 (Ranked 103rd)
Translate the WindowsAzureStorage extension if it is available at translatewiki.net
Category:All extensions

The WindowsAzureStorage extension enables MediaWiki to store uploaded files to the Windows Azure Storage service.

Installation

  • Download and move the extracted WindowsAzureStorage folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/WindowsAzureStorage
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'WindowsAzureStorage' );
    
  • Configure as required.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration

Add the following to the end of the "LocalSettings.php" file to start using your Windows Azure Storage account as the file backend for your wiki. You will need to change your_azure_storage_account and your_azure_storage_account_key to the relevant values.

$wgFileBackends[] = [
    'name'         => 'localAzure',
    'class'        => 'WindowsAzureFileBackend',
    'lockManager'  => 'nullLockManager',
    'azureAccount' => 'your_azure_storage_account',
    'azureKey'     => 'your_azure_storage_account_key'
];

$wgLocalFileRepo = [
    'class'             => 'LocalRepo',
    'name'              => 'local',
    'backend'           => 'localAzure',
    'scriptDirUrl'      => $wgScriptPath,
    'scriptExtension'   => $wgScriptExtension,
    'url'               => $wgScriptPath . '/img_auth.php',
    'hashLevels'        => 0,
    'deletedHashLevels' => 0,
    'zones'             => array(
        'public'  => [ 'container' => 'public' ],
        'thumb'   => [ 'container' => 'thumb' ],
        'temp'    => [ 'container' => 'temp' ],
        'deleted' => [ 'container' => 'deleted' ]
    ]
];

$wgImgAuthPublicTest = false;

See also

Category:Extensions by HalloWelt
Category:All extensions Category:Extensions by HalloWelt Category:Extensions in Wikimedia version control Category:Extensions without a compatibility policy Category:File repository extensions Category:GPL licensed extensions Category:Stable extensions