Purpose
To manage attachments on TWiki topics
Used by
This module is primarily used by ...
| Note: |
Below documentation is extracted from the currently installed TWiki::Attach Perl module by the PerlDocPlugin |
package TWiki::Attach
A singleton object of this class is used to deal with attachments to topics.
ClassMethod new($session)
Constructor.
=begin twiki
ObjectMethod finish()
Break circular references.
ObjectMethod renderMetaData( $web, $topic, $meta, $args ) -> $text
Generate a table of attachments suitable for the bottom of a topic
view, using templates for the header, footer and each row.
-
$web the web
-
$topic the topic
-
$meta meta-data hash for the topic
-
$args hash of attachment arguments
ObjectMethod formatVersions ( $web, $topic, $attrs ) -> $text
Generate a version history table for a single attachment
-
$web - the web
-
$topic - the topic
-
$attrs - Hash of meta-data attributes
ObjectMethod getAttachmentLink( $user, $web, $topic, $name, $meta ) -> $html
-
$user - User doing the reading
-
$web - Name of the web
-
$topic - Name of the topic
-
$name - Name of the attachment
-
$meta - Meta object that contains the meta info
Build a link to the attachment, suitable for insertion in the topic.
Please see
CodevDocumentationProject and
CodevDocumentationProjectDev for comments on the format of these pages.
Contributors:
--
MartinCleaver - 23 Jun 2002
--
PeterThoeny - 02 Feb 2004
Discussions
Switched to using
PerlDocPlugin for function-level documentation, and set parent topic to
CodevDocumentationProject.
--
WalterMundt - 01 Feb 2004
Any idea why there is a newline before the attachment table?
Line 74:
$text = "\n$header$metaText\n\n";
--
ArthurClemens - 10 Apr 2004
Any reason why I shouldn't make Attachment dynamically attach everything found in the appropriate pub directories?
--
MartinCleaver - 15 Oct 2004
Yes, meta-data in the topics. Wait for
LocationLocationLocation, which encapsulates attahcment handling code much better and would be a better starting point (good idea, BTW!)
--
CrawfordCurrie - 15 Oct 2004
Should I assume you mean because
MetaData can only be accessed if you access the topic as well?
--
MartinCleaver - 15 Oct 2004