|
|
This plugin intercepts the TWiki:Codev.BeforeAttachmentSaveHandler to process a zip file, attaching each of the individual files to the designated topic instead of the zip file.
Syntax Rules
- None - it applies as long as it is enabled. (Off by default)
Examples
Plugin Settings
Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. Link =ExternalSite:Page text to external sites based on aliases defined in the InterWikis topic=
- Debug plugin: (See output in
data/debug.txt)
- If disabled, does nothing.
Plugin Installation Instructions
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
- Download the ZIP file from the Plugin web (see below)
- Unzip
BatchUploadPlugin.zip in your twiki installation directory. Content:
| File: | Description: |
data/TWiki/BatchUploadPlugin.txt | Plugin topic |
data/TWiki/BatchUploadPlugin.txt,v | Plugin topic repository |
lib/TWiki/Plugins/BatchUploadPlugin.pm | Plugin Perl module |
- Flip ENABLED switch to 1
- Test if the installation was successful:
Caveats
-
- Required support (add an attachment) not in TWiki::Func, so I call TWiki::UI::Upload
- UPLOADZIPLIMIT, UPLOADNOSPACES, UPLOADLOWERCASE features deleted - belong in upload
- PNG support deleted (should be in TWiki::UI::Upload)
- No longer uses oops templates (plugins can't use them)
- Dies instead of finishes, because otherwise it can't veto zip attach
- Doesn't carry through the hide or link flags
- Comment field on extracted files is not customisable
Further Development
-
- Put back deleted functionality.
- TWiki:Codev.BeforeAttachmentSaveHandler needs veto capability
- Ugly die needs replacing
- Test what happens if you upload zips of zips
- There is a method - currently called findTopicForPicture which is disabled by default - this can be used to change the destination topic for each archive element. We need a TWiki:Codev.ExtensionInteractionPoint to allow plugins to have their functionality overridden.
Plugin Info
| 23 Sep 2005 | TWiki:Main.SteveHobbs - updated zip with patch from
Batch Upload Plugin Dev?, plus removal of Meta Tags? in this topic |
Related Topics: TWikiPreferences, TWikiPlugins
-- TWiki:Main/MartinCleaver - 31 Oct 2004
|