Manüel:$wgLocalFileRepo

From mediawiki.org
This page is a translated version of the page Manual:$wgLocalFileRepo and the translation is 42% complete.
Outdated translations are marked like this.
Dosya ve dosya yüklemeleri: $wgLocalFileRepo
Yerel depo için tek bir depo yapısı.
Sürümde tanıtıldı:1.11.0 (r22580)
Sürümde kaldırıldı:hala kullanımda
İzin verilen değerler:(dizi)
Varsayılan değer:aşağıya bakınız

Ayrıntılar

This config is for customising the local (primary) file repo that MediaWiki uses. Most users will not want to customise this or will customise this indirectly via other variables such as $wgUploadDirectory .

More complex setups may requiring customising this variable. For example, if you want to use a custom file backend, in order to replicate file storage amongst multiple data centers.

Tüm depolar için gereken özellikler

class
Deponun sınıf adı. Çekirdek veya uzantıdan gelebilir. Çekirdek depo sınıfları FileRepo, LocalRepo, ForeignDBRepo'dur. (FSRepo da geriye dönük uyumluluk için desteklenir.)
name
'local' olarak ayarlanmalıdır.
backend
Bir dosya arka uç adı (bkz. $wgFileBackends ). $wgLocalFileRepo ve $wgForeignFileRepos için tanımlanmamışsa, Setup.php içinde otomatik olarak bir ad oluşturulur.

General parameters for LocalRepo class

Name Description Default
zones Config of where to store files (different zones like public vs deleted). An array of zone descriptions containing: container, url, directory, urlsByExt. Some other config options may override this one in specific cases
url Temel genel URL
hashLevels Dosyaların karma tabanlı bölümü için dizin seviyelerinin sayısı (bilgi için bkz. $HashedUploadDirectory)
deletedHashLevels 'hashLevels' override for the "deleted" zone.
thumbScriptUrl thumb.php URL'si (isteğe bağlı, önerilmez)
transformVia404 Medya dosyası dönüşümünün ayrıştırmada atlanıp atlanmadığı ve bunun yerine bir 404 işleyiciye bağlı olup olmadığı.
thumbProxyUrl URL of where to proxy thumb.php requests to. This is also used internally for remote thumbnailing of upload stash files. Example: http://127.0.0.1:8888/wiki/dev/thumb/
thumbProxySecret Optional value of the X-Swift-Secret header to use in requests to thumbProxyUrl
disableLocalTransform Do not resize images on local machine, but instead use some other system to do so
initialCapital $wgCapitalLinks 'e eşdeğer, dosya adlarının dolaylı olarak bir büyük harfle başlayıp başlamayacağını belirler. Geçerli uygulama, yerel $wgCapitalLinks ve initialCapital eşleşmiyorsa hatalı açıklama sayfası bağlantıları verebilir.
pathDisclosureProtection Tüm parametreleri hata mesajlarından kaldırmak için 'paranoyak' olabilir, yolları hiç değişmeden bırakmak için 'hiç' veya yolları yer tutucularla değiştirmek için 'basit' olabilir. LocalRepo için varsayılan 'basittir'.
fileMode Used by FileBackend to set the unix permissions on created files. 0644
directory Used by FileBackend to determine upload directory
thumbDir The base thumbnail directory (if not overridden by zone directive)
thumbUrl The base thumbnail URL (if not overridden by zone directive)
isPrivate Is this repo private (E.g. its a private repo). Steps are taken to prevent direct access, but may not be sufficient and you should still make sure the files aren't somewhere served by webserver.
useJsonMetadata Store serialised metadata as JSON instead of php-serialised format. false (1.38)/
true (1.39+)
useSplitMetadata Store large chunks of FileMetadata in external storage. Some files have their entire text layer as metadata, which can cause memory issues if stored directly on the file. false
splitMetadataThreshold Threshold above which metadata items should be split into external storage. 1000
updateCompatibleMetadata Automatically regenerate file metadata if it is detected metadata is out of date. false
reserializeMetadata Automatically change metadata format (E.g. to JSON) or split it to separate storage, if it is detected as needed. false


Varsayılan değer

Setup.php dosyasındaki bu kod, diğer yapılandırma ayarlarının değerlerine bağlı olarak $wgLocalFileRepo için varsayılan bir değer oluşturur:

if ( !$wgLocalFileRepo ) { $wgLocalFileRepo = [ 'class' => LocalRepo::class, 'name' => 'local', 'directory' => $wgUploadDirectory , 'scriptDirUrl' => $wgScriptPath , 'url' => $wgUploadBaseUrl  ? $wgUploadBaseUrl . $wgUploadPath  : $wgUploadPath, 'hashLevels' => $wgHashedUploadDirectory  ? 2 : 0, 'thumbScriptUrl' => $wgThumbnailScriptPath , 'transformVia404' => !$wgGenerateThumbnailOnParse , 'deletedDir' => $wgDeletedDirectory , 'deletedHashLevels' => $wgHashedUploadDirectory ? 3 : 0 ]; }

Ayrıca bakınız