手册:$wgMaxUploadSize
文件及文件上传: $wgMaxUploadSize | |
---|---|
最大上传文件大小(字节) |
|
引进版本: | 1.8.0 (r16159) |
移除版本: | 仍在使用 |
允许的值: | (整数或数组) (参见下方) |
默认值: | 1024*1024*100 (100MB) |
其他设置: 按首字母排序 | 按功能排序 |
详情
该设置允许您更改上传到您的Wiki的每个文件大小的最大值。
The value(s) you specify refer to the maximum size, in bytes, of a single file upload (not the total of all uploaded files). The limit is applied at the time of upload, so lowering this value at a later date won't remove existing files that are now 'too large'. This limit only applies to chunked uploads and uploads without separate chunks might have a lower upload limit based on the PHP setting.
There are 1024 bytes in a kilobyte, and 1024 kilobytes in a megabyte, so 1024 * 1024 * 100
= 100 megabytes.
Specifying an integer
This limits the maximum size of uploaded files, in bytes, regardless of how they are uploaded.
$wgMaxUploadSize = 20000000;
Specifying an array
If you would like different maximum sizes for file uploads and upload-by-URL, you can set this variable to an array. For example:
$wgMaxUploadSize = [
'*' => 250 * 1024, // 250 KB
'url' => 500 * 1024, // 500 KB
];
This example will set the maximum for all uploads to 250 KB, except for upload-by-URL, which will have a maximum of 500 KB.
To enable upload-by-URL, see $wgAllowCopyUploads
.
MediaWiki版本: | ≤ 1.17 |