Revision [150]

This is an old revision of AttachmentInfo made by CyneBeald on 2005-11-29 00:59:36.

 

Wikka Documentation

Files


This is the documentation of the files action.
  • For the development page, take a look at FilesAction.
  • For changelog info about the version of the {{files}} action currently included in Wikka, refer to Mod015fFilesAction.
 


File management in Wikka is supported by adding the {{files}} action in a page.

Requirements

  1. a directory for the files has to exist.
  1. the entry upload_path in the wikka.config.php has to match the path for this directory.
  1. the web server has to be able to write to the upload_path.
  1. to upload files or delete attached files you must be an admin.
  1. if you're having problems with PHP safe mode try the FilesActionSafeModeWorkaround

Show or manage attached files

  1. insert the action {{files}} on a page
  1. look at the list to see the files attached to the current page, their size and the date they have been added.
  1. filenames in the list become download links

Upload a file

You must be an admin to do this!
  1. make sure {{files}} is on the page
  1. click on the "Browse..." button to search for a file.
  1. select a file on your computer (you can only select one) .
  1. the name should appear in the box right next to add new attachment.
  1. click on the "+".
  1. if you can see the file in the list, your upload was successful.

Upload and use images (with mod_rewrite enabled)
If you upload an image file with the files action (see above on how to do that) and you have mod_rewrite enabled, you won't see the image when you link to it directly or with the {{images}} action. There is a solution for that:
  1. create one page in which you put the file action. On this page, you should only upload images and no other files
  1. upload an image
  1. copy .htaccess from the /images directory of wikka into uploads/YourPagename

Since the files (images) in this directory will be accessible now, i.e. you aren't redirected to wikka, it is a bad idea to upload anything else than images on this page.

See also Show or manage attached files above.

Download a file

See Show or manage attached files or Create a download link above for creating download links

Delete a file

You must be an admin to do this!
  1. make sure {{files}} is on the page
  1. look for the file you want to delete in the list.
  1. click on the small "x" before the file.

Examples


{{files}}

produces:

Please make sure that the server has write access to a folder named uploads.


{{files download="freemind_sample1.jpg" text="Freemind sample"}}

produces:

Please make sure that the server has write access to a folder named uploads.
Freemind sample


CategoryDocumentation
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki