Extension:WindowsAzureStorage

From MediaWiki.org
(Redirected from Extension:AzureStorage)
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
WindowsAzureStorage

Release status:Extension status stable

Windows Azure logo.png
ImplementationTemplate:Extension#type File repository
DescriptionTemplate:Extension#description Allows MediaWiki to use Windows Azure as the file backend
Author(s)Template:Extension#username Thai Phan, Markus Glaser
Latest versionTemplate:Extension#version 1.1.0 (2013-03-31)
MediaWikiTemplate:Extension#mediawiki 1.20+
LicenseTemplate:Extension#license GPL
Download

Translate the WindowsAzureStorage extension if it is available at translatewiki.net

Check usage and version matrix.

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

Requirements[edit]

This extension needs to have the WindowsAzureSDK extension installed in order to work.

Download[edit]

The extension can be retrieved directly from Git [?]:

  • Browse code
  • Some extensions have tags for stable releases.
  • Each branch is associated with a past MediaWiki release. There is also a "master" branch containing the latest alpha version (might require an alpha version of MediaWiki).

Extract the snapshot and place it in the extensions/WindowsAzureStorage/ directory of your MediaWiki installation.

If you are familiar with git and have shell access to your server, you can also obtain the extension as follows:

cd extensions/
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/WindowsAzureStorage.git

Installation[edit]

To install this extension, you will need to modify your LocalSettings.php.

Activation[edit]

Add the following line to LocalSettings.php and then check to see if it shows up in Special:Version.

require_once("$IP/extensions/WindowsAzureStorage/WindowsAzureStorage.php");

Configuration[edit]

Add the following to the end of LocalSettings.php 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[] = array(
    'name'         => 'localAzure',
    'class'        => 'WindowsAzureFileBackend',
    'lockManager'  => 'nullLockManager',
    'azureAccount' => 'your_azure_storage_account',
    'azureKey'     => 'your_azure_storage_account_key'
);

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

$wgImgAuthPublicTest = false;