DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:preservefilenames

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:preservefilenames [2012-07-31 21:26] – New version 2012-07-31 kazmiyaplugin:preservefilenames [2023-10-30 23:46] (current) Klap-in
Line 1: Line 1:
- 
 ====== PreserveFilenames Plugin ====== ====== PreserveFilenames Plugin ======
  
Line 7: Line 6:
 email      : kazmiya@gmail.com email      : kazmiya@gmail.com
 type       : action, renderer type       : action, renderer
-lastupdate : 2012-07-31 +lastupdate : 2012-10-01 
-compatible : 2009-12-252010-11-072011-05-252012-01-25+compatible : LemmingAnteaterRincewindAngua, Adora Belle
 depends    :  depends    : 
 conflicts  : any_wysiwyg_editors conflicts  : any_wysiwyg_editors
 similar    :  similar    : 
 tags       : file, media tags       : file, media
-downloadurl: http://github.com/kazmiya/dokuwiki-plugin-preservefilenames/zipball/master +downloadurl: https://github.com/kazmiya/dokuwiki-plugin-preservefilenames/zipball/master 
-bugtracker : http://github.com/kazmiya/dokuwiki-plugin-preservefilenames/issues +bugtracker : https://github.com/kazmiya/dokuwiki-plugin-preservefilenames/issues 
-sourcerepo : http://github.com/kazmiya/dokuwiki-plugin-preservefilenames/+sourcerepo : https://github.com/kazmiya/dokuwiki-plugin-preservefilenames
 ---- ----
  
 ===== Download and Installation ===== ===== Download and Installation =====
  
-<del>**Not compatible with Angua!**</del> Sorry for the late update! ;-)+Search and install the plugin using the [[plugin:extension|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".
  
-Download and install the plugin using the [[:plugin:plugin|Plugin Manager]] using the following URL.+Download  | https://github.com/kazmiya/dokuwiki-plugin-preservefilenames/zipball/master |
  
-^ Download  | http://github.com/kazmiya/dokuwiki-plugin-preservefilenames/zipball/master | 
  
-:!: Using the Plugin Manager is the recommended way. If you are manually installing, you need to rename the extracted directory to "preservefilenames". In that case, refer to [[:plugin|Plugins]] on how to install plugins manually. 
  
 **Changelog**: **Changelog**:
  
-{{rss>http://github.com/feeds/kazmiya/commits/dokuwiki-plugin-preservefilenames/master 5 date 1d}}+{{rss>https://github.com/kazmiya/dokuwiki-plugin-preservefilenames/commits/master.atom 5 date 7d}}
  
 ===== Overview ===== ===== Overview =====
Line 38: Line 35:
 By default, DokuWiki normalizes media file names by means of normalized method documented in [[:pagenames]]. By default, DokuWiki normalizes media file names by means of normalized method documented in [[:pagenames]].
  
-For example, a media file which 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.+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. 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.
Line 44: Line 41:
 ===== Features ===== ===== Features =====
  
-==== Filename preservation ====+==== File name preservation ====
  
 This plugin uses a meta file to store and retrieve an original name of an uploaded file. This plugin uses a meta file to store and retrieve an original name of an uploaded file.
  
-**Storing Process**:+Storing Process:
  
-  * Occurred when:+  * Occurs when:
     * Uploading files via upload interface of DokuWiki     * Uploading files via upload interface of DokuWiki
   * Process details:   * Process details:
Line 56: Line 53:
     - DokuWiki normalizes the file name into ''%%"dw_my_dokuwiki_stuff.zip"%%''     - DokuWiki normalizes the file name into ''%%"dw_my_dokuwiki_stuff.zip"%%''
     - DokuWiki stores the file in ''%%"data/media/dw_my_dokuwiki_stuff.zip"%%''     - DokuWiki stores the file in ''%%"data/media/dw_my_dokuwiki_stuff.zip"%%''
-    - The plugin creates a meta file ''%%"data/meta/dw_my_dokuwiki_stuff.zip.filename"%%''+    - The plugin creates a meta file ''%%"data/media-meta/dw_my_dokuwiki_stuff.zip.filename"%%''((For DokuWiki Rincewind or earlier, the plugin uses ''%%data/meta/%%'' instead of ''%%data/media-meta/%%'' for storing meta files.))
     - The plugin stores original file name in the meta file     - The plugin stores original file name in the meta file
  
-**Retrieving Process**:+Retrieving Process:
  
-  * Occurred when:+  * Occurs when:
     * Filling label text of media links with no designated label text in wiki pages     * Filling label text of media links with no designated label text in wiki pages
     * Displaying a file list in media manager     * Displaying a file list in media manager
Line 74: Line 71:
 So if you don't like this plugin, you can safely uninstall this plugin without any side effects. So if you don't like this plugin, you can safely uninstall this plugin without any side effects.
  
-==== Better filename handling in snippet download ====+==== Better file name handling on downloading ====
  
 This plugin resolves [[http://bugs.php.net/bug.php?id=37738|PHP Bug #37738]] and introduces [[http://greenbytes.de/tech/tc2231/|RFC 2231 style Content-Disposition header]] for compliant browsers to mainly make a correct handling for East Asian characters in file names. This plugin resolves [[http://bugs.php.net/bug.php?id=37738|PHP Bug #37738]] and introduces [[http://greenbytes.de/tech/tc2231/|RFC 2231 style Content-Disposition header]] for compliant browsers to mainly make a correct handling for East Asian characters in file names.
  
-For example, you can download snippet below as "''文書_1.txt''" instead of "''_1.txt''" by installing this plugin.+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.
  
 <file txt 文書_1.txt> <file txt 文書_1.txt>
Line 90: Line 89:
 ===== Notes ===== ===== Notes =====
  
-  * When you want to preserve file names, you cannot use FTP or any other "direct" methods to upload files. Since this plugin uses meta data to store original file name, you are required to use DokuWiki'normal file upload interface (including multi uploader) to set meta data.+  * The [[:config:refcheck]] feature probably does not work on a media file whose name contains special characters for DokuWiki (white spaces, parentheses, etc.). 
 +  * When you want to preserve file names, you cannot use FTP or any other "direct" methods to upload files. Since this plugin uses meta data to store original file name, you are required to use normal file upload interface (including multi uploader) of DokuWiki to set meta data.
   * Even if original file names are different, you need to pay attention whether the names are normalized into the same media ID or not. For example, both ''[1].txt'' and ''(1).txt'' are normalized into the same ''1_.txt'' by DokuWiki. You cannot upload both files in same namespace.   * Even if original file names are different, you need to pay attention whether the names are normalized into the same media ID or not. For example, both ''[1].txt'' and ''(1).txt'' are normalized into the same ''1_.txt'' by DokuWiki. You cannot upload both files in same namespace.
  
 ===== Feedback ===== ===== Feedback =====
  
-Any feedback is welcome. Please use the [[http://github.com/kazmiya/dokuwiki-plugin-preservefilenames/issues|Issue Tracker]] to send your feedback.+Any feedback is welcome. Please use the [[https://github.com/kazmiya/dokuwiki-plugin-preservefilenames/issues|Issue Tracker]] to send your feedback.
  
plugin/preservefilenames.1343762768.txt.gz · Last modified: 2012-07-31 21:26 by kazmiya

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