Revision [150]
This is an old revision of AttachmentInfo made by CyneBeald on 2005-11-29 00:59:36.
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
- a directory for the files has to exist.
- the entry upload_path in the wikka.config.php has to match the path for this directory.
- the web server has to be able to write to the upload_path.
- to upload files or delete attached files you must be an admin.
- if you're having problems with PHP safe mode try the FilesActionSafeModeWorkaround
Show or manage attached files
- insert the action {{files}} on a page
- look at the list to see the files attached to the current page, their size and the date they have been added.
- filenames in the list become download links
Upload a file
You must be an admin to do this!- make sure {{files}} is on the page
- click on the "Browse..." button to search for a file.
- select a file on your computer (you can only select one) .
- the name should appear in the box right next to add new attachment.
- click on the "+".
- 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:- create one page in which you put the file action. On this page, you should only upload images and no other files
- upload an image
- 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.
Create a download link
- insert {{Files download="filename" text="descriptive name"}} to create a link to download file "filename".
See also Show or manage attached files above.
Download a file
- click on the name of a file to download it.
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!- make sure {{files}} is on the page
- look for the file you want to delete in the list.
- 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