See also: Uploads, Uploads admin.
:$EnableUpload:The upload.php script is automatically included from stdconfig.php if the $Enable Upload? variable is true in config.php. Note that one may still need to set an upload password before users can upload (see UploadsAdmin).
$UploadDir
:$UploadUrlFmt:The url of the directory given by $Upload Dir?. By default, $UploadUrlFmt is derived from $Pub Dir Url? and $UploadDir
.
$IMapLinkFmt['Attach:']
\$LinkText
Δ");
$UploadPrefixFmt
'/$Group'
(uploads are organized per-group), but can be set to other values for sitewide or per-page attachments.
$UploadPrefixFmt = '/$Group/$Name'; # per-page attachments
$UploadPrefixFmt
= ''; # sitewide attachments
$UploadPrefixFmt
variable defined in config.php, the same for all pages in the wiki, and not in group/page local configuration files. Otherwise you will be unable to link to attachments in other wikigroups.
:$EnableDirectDownload:When set to 1 (the default), links to attachments bypass PmWiki and come directly from the webserver. Setting $Enable Direct Download?=0; causes requests for attachments to be obtained via ?action=download
. This allows Pm Wiki to protect attachments using a page's read permissions, but also increases the load on the server. Don't forget to protect your directory /uploads/ with a .htaccess file (Order Deny,Allow / Deny from all).
:$EnableUploadGroupAuth:Set @@$Enable Upload Group Auth? = 1; to authenticate downloads with the group password. This could be used together with
$EnableDirectDownload
= 0;@@.
file.ext,timestamp
(instead of being overwritten). timestamp
is a Unix-style timestamp.
"-\w. "
, which means alphanumerics, hyphens, underscores, dots, and spaces can be used in upload names, and everything else will be stripped.
:$MakeUploadNamePatterns: An array of regular expression replacements that is used to normalize the filename of an attached file. First, everything but $Upload Name Chars? will be stripped, then the file extension will be converted to lowercase. Administrators can override these replacements with a custom definition (the full array needs to be defined).
$UploadDirQuota = 100*1024; # limit uploads to 100KiB $UploadDirQuota = 1000*1024; # limit uploads to 1000KiB $UploadDirQuota = 1024*1024; # limit uploads to 1MiB $UploadDirQuota = 25*1024*1024; # limit uploads to 25MiB $UploadDirQuota = 2*1024*1024*1024; # limit uploads to 2GiB
:$UploadPrefixQuota:Overall size limit for one directory containing uploads. This directory is usually @@uploads/GroupName@@ (one for every WikiGroup), or @@uploads/Group/PageName@@ (one for every page), depending on the variable $Upload Prefix Fmt?.
:$UploadExtSize:Maximum size per extension, overriding the default in $Upload Max Size?.
$UploadExtSize['zip'] = 2*1024*1024; # allow up to 2MiB for zip files