DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:upload

upload Plugin

Compatible with DokuWiki

Adora Belle, Weatherwax, Binky, Detritus

plugin Includes file upload into wikipages depending on the user rights

Last updated on
2014-01-02
Provides
Syntax
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with media, upload

Download and Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

Documentation

The documentation for the Upload-Plugin can be found at: http://studiy.tu-cottbus.de/projektwiki/gruppen:ag_server:produkte:upload_plugin

Syntax

To add the upload form to a wiki page use the following syntax

{{upload>[namespace]|[options]}}

Namespace can be relative to the actual namespace or one of two keywords.

The keyword @current@ can be used to upload the files into the current namespace.

The keyword @page@ can be used to upload the files into a namespace with the same name as the page.

Options

OVERWRITE let the user choose wether to overwrite existing files or keep the file that is already there.

RENAMEABLE shows additionally a textfield to rename the file when uploading.

The options are separated by | (a pipe), for example:

{{upload>:files:}}
{{upload>@current@|OVERWRITE}}
{{upload>@page@|OVERWRITE|RENAMEABLE}}

Features

  • better handling of submitted form: uses an action plugin to process the form data
  • correct caching: uses meta-data and the cache_use event to handle the different user access rights and form visibility
  • nicer fieldset and formatting

To display the uploaded files, there are other plugins:

Discussion

I installed it on “DokuWiki Release 2009-02-14b” using Plugin manager, it shows the Upload box, but when I click “upload”, nothing happens - the selected file isn't uploaded. When I change the Form action in the source code to be “lib/exe/mediamanager.php”, it uploads the file but then shows the Media manager instead of the original page…
Christian Marg 2010/01/05 10:31

I installed the application on the latest stable release, however I have no upload button anywhere added to my wiki sites. There doesn't seem to be a way for users to upload.
Chad 5 Jan 2010 12:33 PM GMT -4

Should be solved in the current version. — R.Rotta 9 Feb 2011

Nice plugin. Thank you. However, the link that is used in <form … action=“”> (file syntax.php, line 39) should be generated with “wl($ID)”, not “DOKU_BASE.'doku.php?id='.$ID”, because wl() takes care of the various dokuwiki rewriting possibility.
schplurtz 2011/02/18 17:15
Done. — Matthias Schulte 2014/01/02 13:02 In 2012-01-25 “Angua”, the RENAMEABLE-function doesn't work for me. The files are uploaded with their initial filename. — Kraligor 2012/02/24 12:14 Lösung: Replace in action.php in Line 70 <code> $_POST['id'] = $_POST['new_name']; </code> in <code> $_POST['mediaid'] = $_POST['new_name']; </code> - hhoch3 4. May 2012 Fixed. — Matthias Schulte 2014/01/02 18:00

In 2012-01-25 “Angua” and before you get a permissionmistace which disappears when you log in. (Idea of plugin is great.) — deshi 2012-04-13 Added to compatibility info box. — Matthias Schulte 2014/01/02 18:00

Shows alert when not logged in

Using “Weatherwax,” when not logged in, an alert bar shows on the start page when this plugin is enabled. Also experiencing the same bug reported from “ajfre.” Have to touch the config files to show the created page. Love the plugin otherwise! — Mojangsta 2014/01/17 10:07

Using Release 2013-12-08 “Binky”, when not logged in, an alert bar shows on top of the start page. If the plugin is disabled all is ok. Thanks Konrad 23-01-2014

With “Binky” installed, I get alert bar with message “Upload failed. Maybe wrong permissions?” for user who is not logged in. All OK when user is logged in. Touching /conf/local.php makes no difference - alert bar is still there (shows up just below the 'Trace' on the new default dokuwiki template, even on pages that do not contain any code for upload plugin. — charles.minto 2014/01/24 01:37

You may fix the code this way: action.php around Line 62
if($AUTH < AUTH_UPLOAD) {
if($AUTH < AUTH_UPLOAD && $_FILES['upload']['tmp_name']) {

Just a note to verify that the code above fixes the problem that I reported.— charles.minto 2014/03/28 14:54
Works in hrun, too. — KaiMartin 2015-03-11 21:02
This patch is still necessary in detritus. — KaiMartin 2015-10-15 19:02

Needs manual refresh after creation of a new page

In Dokuwiki Release Ponder Stibbons, the plugin is not rendered after creating a new page (only a blank page is displayed). The page has to be refreshed once in order to get it rendered. Removing

$controller->register_hook('PARSER_CACHE_USE', 'BEFORE', $this, '_hook_function_cache');

in action.php seems to make the problem disappear. But I am not that familiar with Dokuwiki and can't tell if that causes any unwanted side effects.. — sieber 2014/07/10/

I can confirm, that this glitch also shows in Detritus. A simple refresh does not suffice to get a correctly rendered page. You have to make a small change and save. This seems to reset the cache and everything is fine from thereon out. (Have not tried the fix, yet) — KaiMartin 2015-10-14 14:06
plugin/upload.txt · Last modified: by fusibal

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki