click on the Biowiki logo to go to homepage





Research Teaching | Blog
Main | GBrowse | TWiki
Biowiki > TWiki > BatchUploadPlugin

Search

Advanced search...

Topics


Links

PageRank Checker

Batch Upload Plugin

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

    • N/A

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)
    • Set DEBUG = 0

  • If disabled, does nothing.
    • Set ENABLED = 1

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:
    • try uploading a zip file

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

Plugin Author: TWiki:Main.MartinCleaver
Plugin Version: 31 Oct 2004 (V1.000)
Change History:  
| 23 Sep 2005 | TWiki:Main.SteveHobbs - updated zip with patch from Batch Upload Plugin Dev?, plus removal of Meta Tags? in this topic |
31 Oct 2004 TWiki:Main.MartinCleaver - initial version as plugin
09 Apr 2004 TWiki:Main.DiabJerius
17 Nov 2003 TWiki:Main.JohannesMartin
20 Mar 2003 TWiki:Main.RonKellam
16 Aug 2002 TWiki:Main.ThomasWeigert
14 Jan 2002 TWiki:Main.RyanFreebern
30 Oct 2001 TWiki:Main.VitoMiliano
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: none
Other Dependencies: CPAN:Archive::Zip
Perl Version: 5.005
TWiki:Plugins/Benchmark: GoodStyle nn%, FormattedSearch nn%, Batch Upload Plugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/BatchUploadPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/BatchUploadPluginDev

Related Topics: TWikiPreferences, TWikiPlugins

-- TWiki:Main/MartinCleaver - 31 Oct 2004

Actions: Edit | Attach | New | Ref-By | Printable view | Raw view | Normal view | See diffs | Help | More...