version=pmwiki-2.2.4 ordered=1 urlencoded=1 agent=Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.12) Gecko/2009070811 Ubuntu/9.04 (jaunty) Firefox/3.0.12 author=Petko charset=ISO-8859-1 csum=+ host=81.65.12.233 name=PmWiki.Uploads rev=120 targets=PmWiki.PmWiki,PmWiki.Images,PmWiki.UploadsAdmin,PmWiki.WikiGroup,PmWiki.PageDirectives,PmWiki.WikiAdministrator,PmWiki.Passwords,PmWiki.PasswordsAdmin,Site.PageActions,PmWiki.AvailableActions text=(:Summary:Allow authors to upload files, also known as page attachments:)%0a(:Audience: authors (intermediate) :)%0a[[PmWiki]] can be configured to allow authors to upload and store files and [[images]] (known as attaching them).%0aThese attachments may then be referenced from any page. %0a%0a-> ''Note'': ''[[PmWiki]] is distributed with uploads disabled by default. See [[Uploads Admin]] for information about how to enable and configure the upload feature.''%0a%0a-> ''Note2'': ''Uploads can be configured site-wide, by-group, or by-page; see [[Uploads Admin]] for details. This determines whether all uploads go in one directory for the site, an individual directory for each group, or an individual directory for each page. The default is to organize uploads by [[WikiGroup | group]].''%0a%0a!! [@Attach:@] Syntax%0aTo add or link to an attachment, an author edits a page to include the markup "@@Attach:@@" followed by a name of an attachment (e.g., "@@[=Attach:resume.pdf=]@@"). When the page is displayed, the @@Attach:@@ markup becomes one of the following:%0a%0a* A link to the named attachment (if uploaded, ie already in the upload directory)%0a* 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)%0a* If the attachment is an [[image(s)]] file with an extension such as .gif, .jpeg, or .png, it is displayed as an [[image(s)]].%0a%0aThe behaviour of links can be modified to%0a* prevent an image attachment from displaying as an image, place it in double brackets (e.g., [@[[Attach:image.jpg]]@]).%0a* have a link to an attachment appear without the "[@Attach:@]" at the beginning of the link, use [@[[(Attach:)file.ext]]@].%0a%0a!! Attachments on other pages and groups%0aTo 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).%0a->[@Attach:Groupname./file_name.ext@] (note the dot after the groupname)%0aIf PmWiki is configured with an individual directory per page use%0a->[@Attach:Pagename/file_name.ext@] (Pagename is in the same WikiGroup)%0a->[@Attach:Groupname.Pagename/file_name.ext@]%0a%0a!! Names with spaces%0aTo link to a filename with spaces in it use the bracket link notation, eg%0a->[@[[Attach:a filename with spaces.txt]]@]%0aTo attach an [[PmWiki/image(s)]] file with spaces in the name so that is shows as an image use one of these {+workarounds+}%0a->[@[[#blank | Attach:image space.jpeg]]@]%0a->[@[[#1 | Attach:image space.jpeg]]@]%0a%0a!! Listing Uploaded Files On A Page%0aTo list files that have been uploaded, use the markup:%0a[[PmWiki/PageDirectives#attachlist | [@(:attachlist:)@] ]]%0a%0aThis 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.%0a%0a!!!Upload Form / Upload Replacement%0aOne can go directly to the upload form by appending "?action=upload" to the URI for any page that has file uploads enabled by the [[Wiki Administrator]]. Replace a file by simply uploading a new version of the file with the same name. %0a* Be sure to clear your browser cache after replacing an upload. Otherwise, it may appear that the original upload is still on the server. %0aIf you put @@$EnableUploadVersions=1;@@ in your @@local/config.php@@, the old versions of the same files are renamed and not removed.%0a%0a%0a!!!Type and Size Restrictions%0aFor security reasons, the upload feature is disabled when PmWiki is first installed.%0aWhen 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". %0a%0aIn addition, the administrator can configure the system to require an @@upload@@ password--see [[Passwords]] and [[PasswordsAdmin]].%0a%0aBy default the upload allows the following extensions:%0a%0a[[#imagetypes]] %0a->[@'gif','jpg','jpeg','png','bmp','ico','wbmp', # images%0a@]%0a[[#imagetypesend]]%0a->[@'mp3', 'au','wav', # audio%0a'mpg','mpeg','wmf','mov','qt','avi', # video%0a'zip', 'gz','tgz','tar','rpm','hqx','7z' # archives%0a'odt','ods','odp', # OpenOffice.org%0a'doc','ppt','xls','exe','mdb', # MSOffice%0a'pdf','psd', 'ps','ai','eps', # Adobe%0a'htm','html','fla','swf', # web stuff%0a'txt','rtf','exe','tex','dvi','' # misc@]%0a%0a!!!Removal%0aAt present uploaded files can only be deleted from the server by the [[wiki administrator]]. Any uploads-authorized user may over-write an existing file by uploading another of the same name and extension to the same location.%0a%0aThe administrator may remove an uploaded file by accessing the server via ftp (or via a control panel, if the host offers such a feature). The recipe Cookbook:Attachtable allows the deletion of the files from the wiki.%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: When I upload a file, how do I make the link look like "file.doc" instead of "Attach:file.doc"?%0aA: Use parentheses, as in [@[[(Attach:)file.doc]]@]. There is also a configuration change that can eliminate the [@Attach:@] -- see [[Cookbook:AttachLinks]].%0a%0aQ: Why can't I upload files of size more than 50kB to my newly installed PmWiki?%0aA: Out of the box PmWiki limits the size of files to be uploaded to 50kB. Add%0a->@@$UploadMaxSize = 1000000; # limit upload file size to 1 megabyte@@%0a->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.%0a%0aQ: Why does my upload exit unexpectedly with "Incomplete file received"?%0aA: 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.%0a%0aQ: 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.%0aA: Use the Attach [[Site/page action(s)]], and click on the delta symbol %25blue%25(Δ)%25%25 shown against each of files listed. If you can't see the attach action either uploads are not enabled, you are not not authorized to upload, or the attach action has been commented out or is missing. See also [[PmWiki/available actions]].%0a%0aQ: How do I hide the "[=Attach:=]" for all attachments%0aA: See Cookbook:AttachLinks, note that this does not currently work for [@ [[Attach:my file.ext]] @].%0a%0aQ: How to avoid problems with non-ASCII characters in attachment names (i.e. "Zażółć geślą jaźń.doc")?%0aA: See $UploadNameChars[@ = "-\w. !=+#";@]%25%25 # allow exclamations, equals, plus, and hash%0a%0aQ: How can I link a file that have a 4-letter file extension such like 'abc.pptx'?%0aA: See [[Cookbook:Upload Types]]%0a%0aQ: How can I prevent others from using the url's of my images on their site%0aA: See [[Cookbook:Prevent Hotlinking]] {Cookbook.PreventHotlinking$:Summary}%0a%0a time=1250793393