Wiki source for AttachmentInfo


Show raw source

=====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===
1) A directory for the files has to exist.
1) The entry ##upload_path## in ##[[ConfigurationOptions | 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) {{since version="1.2" display="inline"}} You 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 version="1.1.6.6" display="inline"}} To upload files **you must be an admin**.
1) To delete files **you must be an admin**.
1) If you're having problems with PHP safe mode try [[http://wikkawiki.org/FilesActionSafeModeWorkaround | this solution]].

===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===

1) {{since version="1.2" display="inline"}} Admins 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 version="1.1.6.6" display="inline"}} You must be an admin to upload files!
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.''

===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!
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}}""##
{{files}}

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

----
CategoryEN
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki