Extension:WindowsAzureStorage

This page is a translated version of the page Extension:WindowsAzureStorage and the translation is 100% complete.
Příručka k rozšířením MediaWiki
WindowsAzureStorage
Stav rozšíření: stabilní
Implementace Úložiště souborů
Popis Umožňuje MediaWiki používat Windows Azure jako souborový backend.
Autoři Thai Phan, Markus Glaser
Nejnovější verze 1.2.0
MediaWiki >= 1.34.0
Licence GNU General Public License 2.0 nebo novější
Stáhnout
Přeložte rozšíření WindowsAzureStorage, používá-li lokalizaci z translatewiki.net

Rozšíření WindowsAzureStorage umožňuje MediaWiki ukládat nahrané soubory do služby Windows Azure Storage.

Instalace

  • Stáhněte soubor/y a vložte je do adresáře pojmenovaného WindowsAzureStorage ve vaší složce extensions/.
    Vývojáři a přispěvatelé kódu by si místo toho měli nainstalovat rozšíření from Git pomocí:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/WindowsAzureStorage
    
  • Na konec vašeho souboru LocalSettings.php přidejte následující kód:
    wfLoadExtension( 'WindowsAzureStorage' );
    
  • Configure as required.
  •   Dokončeno – Přejděte na stránku Special:Version vaší wiki a zkontrolujte, zda bylo rozšíření úspěšně nainstalováno.

Konfigurace

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;

Související odkazy