PreventUploadOverwrites

<< | Cookbook-V1 | >>

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Goal

Prevent users from being able to overwrite existing attachments/uploads.

Solution

Add the following code to local.php:

  $EnableUploadOverwrite = 0;

Discussion

By default, the PmWiki.Uploads feature allows authorized users to overwrite existing attachments. For some applications this is inappropriate, especially since the upload/attachment feature doesn't have an easy mechanism for recovering previous versions of an attachment. Setting $EnableUploadOverwrite to zero tells the upload.php module to not allow existing files to be overwritten.

See Also

Contributors

  • Patrick Michaud

pmwiki-2.3.32 -- Last modified by {{efc}}

from IP: 85.171.160.186 ip should be disabled by default for security reasons