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


By default attached files (PmWiki.Uploads) are all associated with a WikiGroup -- i.e., all of the uploads for a particular group are combined together. How can I get uploads to be associated with individual pages or the entire site?


The organization of attachments/uploads is controlled by the $UploadPrefixFmt variable. By default this variable is set to "/$Group/", which places all attached files into subdirectories by group.

To change this so that attachments are organized on a per-page basis, simply add the following to config.php:

    $UploadPrefixFmt = '/$PageName/';

To have all of the attachments for an entire site placed into a single location (i.e., combined across groups), use

    $UploadPrefixFmt = '/';


  • Pm (13-Mar-2004)


I'm using this solution for storing uploads per page. However, while Umlauts work for page names, they don't work for file links. As a result, the users can create pages with Umlaut names and upload files to these pages, but klicking on the resulting links yields an HTTP 404 error. Any way around that? --Henning

I am using an UTF-8 version of pmWiki and I've encountered the same problem. I believe the problem lies in the encoding of file names. The uploaded files were present in the associated directory, but my the apache server seems to use 3bytes UTF-8 encoding to point to the correct file location, while pmWiki gives a url link that is encoded differently.

I'm using this solution to organsise uploads. Is there a way of refering to another pages attachments? -- JamesP

Umlaut problem was fixed in PmWiki 1.0.12, see PITS 00053 --Henning

For referring to another pages attachment, see PITS 00150 --Henning pmwiki-2.3.23 -- Last modified by {{Henning}}

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