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.,
- have a link to an attachment appear without the "
Attach:" at the beginning of the link, use
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)
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
[[#blank | Attach:image space.jpeg]]
[[#1 | Attach:image space.jpeg]]
To list files that have been uploaded, use the markup:
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.
为了安全起见，上传功能默认是关闭的。 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".
'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 功能来管理附件。
$UploadMaxSize= 1000000; # limit upload file size to 1 megabyte
为什么上传出现"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.
详见： Cookbook:AttachLinks 。
如何避免上传的文件名出现乱码问题？ (例如 "Zażółć geślą jaźń.doc")?
= "-\w. !=+#"; # 允许感叹号、等号、加号和hash。
详见：Cookbook:Prevent Hotlinking Prevent hotlinking of uploaded files