The Media Manager

Images and other media files can be uploaded and inserted through a simple mediamanager. To open the media manager click the button in the page editing toolbar.

Browse the available namespace by clicking their name in the left pane. Namespaces can be expanded by a click on the + button right next to the namespace name.

To insert an image at the current cursor position in the edit window, just click the file name or image thumbnail in the right pane.

Just use the upload form at the top right to upload a file. Optionally you can give a new name for the file. Be sure to keep the file extension correct! If you use new namespaces in the name these will be created automatically.

Please note: If the administrator enabled ACL support, upload may be restricted to certain users. Users without the proper permission will not see the upload form

Configuration

First you need to check “file_uploads” on php.ini and verify it is positioned at On.

If you want to upload a file and get a “Upload denied. This file extension is forbidden!” message, you should change the mime configuration.

If /tmp folder on your server is mounted with the “noexec” option mediamanager fails to upload files. You need to modify the “upload_tmp_dir” on php.ini (globally) or in .htaccess

Layout

The Media Manager

The screenshot on the right shows the media manager.

The left part has the name space tree (1) where you can navigate through the existing media namespaces. Media namespaces are separated from the page namespaces but usually follow their structure. You can use the + and - icons to collapse and expand deeper hierarchies. Clicking the namespace name will open it in the right side.

Above the tree are some option checkboxes (2) which influence the behavior of the manager. By default the manager will close when an image was selected. Sometimes this is not wanted, eg. if you like to insert multiple images, you can disable the automatic closing here. If you need a better overview in the right pane, you can hide the details for the media listing. Both options are stored in a cookie and will be remembered by your browser.

The top headline of the right pane always shows the currently selected namespace (3). All uploads you do will be put into this namespace.

Below the headline is the upload form (4). Note that this form will only be displayed if you have the needed permissions to upload in the current namespace. You can rename the file you are about to upload with the second text field. To create subnamespaces just prepend them to the name here. Which file extensions may be uploaded is configured through the mime settings. On compatible browsers an icon to activate the multiuploader is shown here as well.

Below the uploadform comes a listing with available mediafiles. For each file there is a line with a file type icon, the file name, and some toolbar buttons (5). The following buttons may be available depending on the file type and your permissions:

View or download the file
Delete the file
Edit the metadata of the file (JPEG only)

The file may be followed by a thumbnail (6) and a preview of the metadata (7). EXIF metadata editing is currently only supported for JPEG files.

Problems and discussion

  • Hi! I have problem with mediamanager in my dokuwiki. When I try to open it in one particular namespace, it ends with error (Connection closed by remote server. You tried to access the address https://www.fit-wiki.cz/lib/exe/mediamanager.php?ns=%C5%A1kola%3Ap%C5%99edm%C4%9Bty%3Abi-sap, which is currently unavailable. Please make sure that the web address (URL) is correctly spelled and punctuated, then try reloading the page.). When I try to open mediamanager in any other namespace and show content of the namespace mentioned above, nothing is showed (parts 3–7 in layout are blank). This problem appears only at one particular namespace, others work fine. I don't see any differences between this and the others namespaces' permission. Can anybody help me? Any advice where to look?
    Answer: Double-check your ACL rules. Failing that, check your .htaccess file(s) within the appropriate (sub)folder(s).
    Answer didn't help: I checked ACL and that is ok. In given directory there is no .htaccess - there is one in superior directory but that one is common for more directories (namespaces) and uploading works in the others. Any other idea?
  • Hello - my users don't seem to be able to upload files (the UI for adding media isn't there) so I'm guessing theres a permission problem. However, I've scoured the Admin page and can't find that setting - where can I turn on managing media files for other groups?
  • There are two places where the maximum upload size is controlled: Dokuwiki's configuration as above, and also your php.ini file. On my Linux (Gentoo) system, the file to be looking at is /etc/php/apache2-php5/php.ini, and you need to check two values: upload_max_filesize and post_max_size. Both of these need to be above your desired max upload size, and both can be specified either as integer bytes or using shorthand like 500K, 20M, 1G. Not setting either of these high enough will cause the upload to silently fail, though you should see an error in /var/log/apache2/error.log.
  • :?: How to create/delete media namespaces? (They are different from page namespaces). On my wiki there are a bunch of media namespaces, but I can't see how to create a new one
    Answer: Creating a new namespace is easy, just prepend your new namespace name to the filename. After you've done this, you will be able to swicth context/focus to that new namespace in the media manager and continue uploading.
    For example, lets assume you have a namespace called “downloads” and you want to add a new namespace within that one called “documents”. With the context/focus on “downloads” in the media manager, you simply would browse for your file as usual and then enter :documents:yourfilenamehere.doc and your new namespace is created. You can, of course, do this from the root of your site as well; the process is similar. Also, if you later want to remove a namespace, all you need to do is delete the files within it and it will be removed for you. (This can happen if you don't set your namespaces up properly and later want to move files around as a result).
  • :?: I've noticed that if your “Access Control Lists” (ACLs ) are set up in such a way that the highest permission granted to a user or group for a given namespace is “Upload”, then these users will not see or otherwise be able to select the “Overwrite File” option.
    I would REALLY like to be able to prevent certain users from “Deleting” content, yet still allow them to “Overwrite/Replace” certain media.
    Does anyone know if this is possible, or would this need to be an enhancement to the ACL permissions? –Rick (March 1, 2011)
    • I dunno if that really makes sense. There is no saved history for media so if people overwrite, then the old version is completely lost. You might as well allow them to delete as well because there's no damage they could cause that couldn't be dealt by overwriting. –Mark (March 1, 2011)
  • :?: I have a lot of images (hundreds up to thousands in any namespace). The flat organisation is not enough for me. What can i do? (without additional namespaces)
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information
  • Mostra codi font