Table of Contents

PreserveFilenames Plugin

Compatible with DokuWiki

Lemming, Anteater, Rincewind, Angua, Adora Belle

plugin Preserves the original name of the uploaded media file (letter cases, symbols, etc.)

Last updated on
2012-10-01
Provides
Action, Render
Repository
Source
Conflicts with
any_wysiwyg_editors

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 file, media

Download and Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually. If you are manually installing, you need to rename the extracted directory to “preservefilenames”.

Changelog:

Overview

By default, DokuWiki normalizes media file names by means of normalized method documented in pagenames.

For example, a media file whose name is “[DW] My DokuWiki Stuff.zip” is normalized into “dw_my_dokuwiki_stuff.zip” and this normalized name is used as a file name to store file entity in a file system on the DokuWiki server. However, in some cases you might want to use upper case letters, symbols or white spaces in a file name.

By installing this plugin, you can use uploaded media file with its original name instead of normalized name. Letter cases, spaces, symbols and multibyte characters in a file name will all be preserved.

Features

File name preservation

This plugin uses a meta file to store and retrieve an original name of an uploaded file.

Storing Process:

Retrieving Process:

As the default behavior of DokuWiki, media links written in syntax like {{:[DW] My DokuWiki Stuff.zip}} are recognized as normalized media IDs like {{:dw_my_dokuwiki_stuff.zip}} by DokuWiki. And, this plugin stores uploaded media files using default file storing method of DokuWiki (e.g. stored as normalized file name).

So if you don't like this plugin, you can safely uninstall this plugin without any side effects.

Better file name handling on downloading

This plugin resolves PHP Bug #37738 and introduces RFC 2231 style Content-Disposition header for compliant browsers to mainly make a correct handling for East Asian characters in file names.

When you have a media file whose name is “日本語.zip” on your DokuWiki site and you are trying to download that file, you can download the file with the correct file name in almost all modern browsers, without seeing an url-encoded “%E6%97%A5%E6%9C%AC%E8%AA%9E.zip” or any garbled file names.

For example, you can download snippet below as “文書_1.txt” instead of “_1.txt” or any garbled file names by installing this plugin.

文書_1.txt
Sample text

Configuration

There are no configuration options for this plugin.

Notes

Feedback

Any feedback is welcome. Please use the Issue Tracker to send your feedback.

1)
For DokuWiki Rincewind or earlier, the plugin uses data/meta/ instead of data/media-meta/ for storing meta files.