Files Action Documentation
This is the documentation of the files action.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 wikka.config.php] has to match the path for this directory.
- The web server has to be able to write to the upload_path.
- since 1.2You can use the INTRANET_MODE option to allow write access for non-admin users. Note: This option must be explicitly enabled in files/files.php, and is not currently available in wikka.config.php.
until 1.1.6.6To upload files you must be an admin.
- To delete files you must be an admin.
- If you're having problems with PHP safe mode try this solution.
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
- since 1.2Admins can set the INTRANET_MODE option in files/files.php to allow uploads by non-admin users. Note: This option must be explicitly set, and is not currently available in wikka.config.php.
until 1.1.6.6You must be an admin to upload files!
- 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)
By copying an image link as displayed in the attachment box after uploading a file, you can use this link directly in the url parameter of the {{image}} action, regardless of whether or not mod_rewrite is in use.If you choose to use a relative URL as the argument to the url parameter (for instance, url="uploads/ImagePage/myImages.jpg"), the image will not display. 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}}
Please make sure that the server has write access to a folder named uploads.
{{files download="freemind_sample1.jpg" text="Freemind sample"}}
Please make sure that the server has write access to a folder named uploads.
Freemind sample CategoryEN