Enable Uploads

Uploads provide a convenient way to "attach" files, images in particular, in you site's pages.

See also: PmWiki.Uploads

Uploads (attachments) are enabled for all authors by default because it's anticipated that most site administrators would want that.

Setting an Upload Password

You can set an "upload" password that will require authors to to know that password if they want to upload files. If you prefer to do that,

  1. comment out the line in local/config.php that starts with $HandleAuth['upload'] by inserting a # at the beginning of that line, then
  2. uncomment the second line (by removing the # at the beginning of that line) and add an upload password.

Disabling Uploads

If you prefer to disable uploads altogether, comment out the line that starts with $HandleAuth['upload'] by inserting a # at the beginning of that line. Both lines will be commented out like this:

# $HandleAuth['upload'] = 'edit';   // If you can edit, you can upload
# $DefaultPasswords['upload'] = pmcrypt('');   // Must know upload password

Delete the ''uploads/' directory if you disable uploads before files have been uploaded.

Setting the Maximum Upload Size

By default all uploads are limited to 2048K bytes. You can change that limit. Find the line that looks like this:

$UploadMaxSize = 2097152; // Two megs

and make the appropriate change.

Note: Webserver software and PHP may also set limits on upload file size.

See also: PmWiki.UploadsAdmin

Page last modified on October 20, 2016, at 11:55 PM
Powered by: PmWiki and Quick Wiki CMS