PmWiki
:
"Attach:
" (, "Attach:resume.pdf
"). When the page is displayed, the Attach:
markup becomes one of the following:
- A link to the named attachment (if uploaded, ie already in the upload directory)
- A link to a form whereby the author can specify a file to be uploaded and used as the new attachment (if not yet uploaded, ie not in the upload directory)
- If the attachment is an image file with an extension such as .gif, .jpeg, or .png, it is displayed as an image.
The behaviour of links can be modified to
- prevent an image attachment from displaying as an image, place it in double brackets (e.g.,
[[Attach:image.jpg]]
).
- have a link to an attachment appear without the "
Attach:
" at the beginning of the link, use [[(Attach:)file.ext]]
.
To link to an uploaded attachment (image or file) from another group, you simply refer the group itself (make sure "Groupname" has the dot in it).
Attach:Groupname./file_name.ext
(note the dot after the groupname)
If PmWiki is configured with an individual directory per page use
Attach:Pagename/file_name.ext
(Pagename is in the same WikiGroup)
Attach:Groupname.Pagename/file_name.ext
To link to a filename with spaces in it use the bracket link notation, eg
[[Attach:a filename with spaces.txt]]
To attach an image file with spaces in the name so that is shows as an image use one of these workarounds
[[#blank | Attach:image space.jpeg]]
[[#1 | Attach:image space.jpeg]]
To list files that have been uploaded, use the markup:
(:attachlist:)
This will list attachments to the current group or page, depending whether attachments are organised per group or per page; each instance includes a link to the attachment for viewing or downloading. A list of attachments is also shown as part of the uploads page form.
"?action=upload"
When enabled uploads are restricted as to the types and sizes of files that may be uploaded to the server (see UploadsAdmin). PmWiki's default configuration limits file sizes to 50 kilobytes and file extensions to common types such as ".gif", ".jpeg", ".doc", ".txt", and ".pdf".
In addition, the administrator can configure the system to require an upload
password--see Passwords and PasswordsAdmin.
'gif','jpg','jpeg','png','bmp','ico','wbmp', #
'mp3', 'au','wav', #
'mpg','mpeg','wmf','mov','qt','avi', #
'zip', 'gz','tgz','tar','rpm','hqx','7z' #
'odt','ods','odp', # OpenOffice.org
'doc','ppt','xls','exe','mdb', # MSOffice
'pdf','psd', 'ps','ai','eps', # Adobe
'htm','html','fla','swf', # web stuff
'txt','rtf','exe','tex','dvi','' # misc
ftp Cookbook:Attachtable
"file.doc"?
[[(Attach:)file.doc]]
PmWiki50kB
to your
config.php to increase limit to 1MB (for example). See
UploadsAdmin? for how to further customize limits. Note that both PHP and webservers also place their own limits on the size of uploaded files.
"Incomplete file received"
You may be running out of space in a 'scratch' area, used either by PmWiki or by PHP. On *nix, check that you have sufficient free space in /tmp and /var/tmp.
How do I make it so that the upload link still allows one to make another upload (if someone wants to replace the old version of a file with a newer version, for example). Currently you only get the upload link when there is no file in the upload directory.
Use the Attach page action, and click on the delta symbol (Δ) shown against each of files listed. If you can't see the attach action either uploads are not enabled, you are not authorized to upload, or the attach action has been commented out or is missing. See also available actions.
"Attach:"
Cookbook:AttachLinks
( "Zażółć geślą jaźń.doc")?
$UploadNameChars
= "-\w. !=+#";
# hash
8'abc.pptx'?
Cookbook:Prevent Hotlinking