Package TWiki::UI::Upload

UI delegate for attachment management functions

StaticMethod attach ($session)

attach command handler. This method is designed to be invoked via the UI::run method.

Generates a prompt page for adding an attachment.

StaticMethod upload ($session)

upload command handler. This method is designed to be invoked via the UI::run method. CGI parameters, passed in $query:

hidefile if defined, will not show file in attachment table
filepath  
filepath1  
| filepath2 | | upto | filepath9 | | upto
filename  
filecomment comment to associate with file in attachment table
createlink if defined, will create a link to file at end of topic
changeproperties  
redirectto URL to redirect to after upload. {AllowRedirectUrl} must be enabled in configure. The parameter value can be a TopicName, a Web.TopicName, or a URL. Redirect to a URL only works if it is enabled in configure.

Does the work of uploading a file to a topic. Designed to be useable for a crude RPC (it will redirect to the 'view' script unless the 'noredirect' parameter is specified, in which case it will print a message to STDOUT, starting with 'OK' on success and 'ERROR' on failure.

Your form should be defined similar to following:

....

r5 - 29 May 2010 - 14:44:45 - TWikiContributor
 
Linux & Open Source for AT91 Microchip Microprocessors

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Microchip® and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries. This site is powered by the TWiki collaboration platform

Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM