PmWiki.Uploads 5.4 KB

12345678910
  1. version=pmwiki-2.1.24 ordered=1 urlencoded=1
  2. agent=Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.0.6) Gecko/20060728 SUSE/1.5.0.6-1.3 Firefox/1.5.0.6
  3. author=Pm
  4. csum=updated answer
  5. host=24.1.26.255
  6. name=PmWiki.Uploads
  7. rev=70
  8. targets=PmWiki.PmWiki,PmWiki.UploadsAdmin,PmWiki.WikiGroup,PmWiki.Images,PmWiki.PageDirectives,PmWiki.WikiAdministrator,PmWiki.Passwords,PmWiki.PasswordsAdmin,PmWiki.DocumentationIndex
  9. text=%25audience%25 authors (intermediate)%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!!![@Attach:@] Syntax%0a[[PmWiki]] can be configured to allow authors to upload and attach files to pages. Each [[WikiGroup]] can have its own collection of named attachments that are shared among all pages in the group. To 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%0a* A link to a form whereby the author can specify a file to be uploaded and used as the new attachment%0a* If the attachment is an image file such as .gif, .jpg, or .png, then it is displayed as an [[image(s)]].%0a%0aTo prevent an image attachment from displaying as an image, place it in double brackets (e.g., [@[[Attach:image.jpg]]@]).%0a%0aTo have a link to an attachment appear without the "[@Attach:@]" at the beginning of the link, use [@[[(Attach:)file.ext]]@].%0a%0aTo link to attachments on another page or WikiGroup, use [@Attach:PageName/file.ext@] or [@Attach:Group.PageName/file.ext@]. %0a%0aTo link to an uploaded image from another group, you need to refer to a page within another group, not just the group itself. Thus, [@Attach:Group.SomePage/image_name.ext@]. Note, you must use the PageName, but that there is no requirement that the page actually exist.%0a%0a!!!Listing All Files For A Page%0aTo list all files that have been uploaded to the current page, enter the markup:%0a[[PmWiki/PageDirectives#attachlist | [@(:attachlist:)@] ]]%0a%0aThis will list all files, file size and a link to download the file on the page.%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. Be sure to clear your browser cache after replacing an upload. Otherwise, it may appear that the original upload is still on the server. If you put @@$EnableUploadVersions=1;@@ in you @@local/config.php@@, the old versions of the same files are renamed and not removed.%0a%0a!!!Type and Size Restrictions%0aFor security reasons, the upload feature is disabled when PmWiki is first installed; once enabled, uploads are generally 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", ".jpg", ".doc", ".txt", and ".pdf". In 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 [@'gif','jpg','jpeg','png','bmp','ico','wbmp', # images%0a 'mp3','au','wav', # audio%0a 'mpg','mpeg','wmf','mov','qt','avi', # video%0a 'zip','gz','tgz','tar','rpm','hqx', # archives%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%0a%25trail%25%3c%3c|[[DocumentationIndex]]|>>%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How do I link to an uploaded file or image from another group?%0aA: Use [@Attach:Groupname./filename.ext@] . Note the extra dot after the group name.%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%0a $UploadMaxSize = 1000000; # limit upload file size to 1 megabyte%0a%0ato your ''config.php'' to increase the limit to 1MB (for example). See [[UploadsAdmin]]%0afor how to further customize limits. Note that both PHP and webservers also place their own limits on the size of uploaded files.%0a%0aQ: Who 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%0a
  10. time=1157732493