Revision [936]

This is an old revision of AttachmentInfo made by BrianKoontz on 2008-03-03 23:30:34.

 

HomePage

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. until 1.1.6.4
    To upload files you must be an admin (
    since 1.1.7
    you can use the INTRANET_MODE option to allow write access for non-admin users).
  1. To delete 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


since 1.1.7

Admins can set the INTRANET_MODE option in files/files.php to allow uploads by non-admin users.

until 1.1.6.4

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)
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:
  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.


Download a file


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


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