data/TWiki/TWikiUIUploadDotPm.txt
author Colas Nahaboo <colas@nahaboo.net>
Sat, 26 Jan 2008 15:50:53 +0100
changeset 0 414e01d06fd5
permissions -rw-r--r--
RELEASE 4.2.0 freetown
colas@0
     1
---+ Package =TWiki::UI::Upload=
colas@0
     2
colas@0
     3
UI delegate for attachment management functions
colas@0
     4
colas@0
     5
colas@0
     6
%TOC%
colas@0
     7
colas@0
     8
---++ StaticMethod *attach* <tt>($session)</tt>
colas@0
     9
colas@0
    10
=attach= command handler.
colas@0
    11
This method is designed to be
colas@0
    12
invoked via the =UI::run= method.
colas@0
    13
colas@0
    14
Generates a prompt page for adding an attachment.
colas@0
    15
colas@0
    16
colas@0
    17
colas@0
    18
---++ StaticMethod *upload* <tt>($session)</tt>
colas@0
    19
colas@0
    20
=upload= command handler.
colas@0
    21
This method is designed to be
colas@0
    22
invoked via the =UI::run= method.
colas@0
    23
CGI parameters, passed in $query:
colas@0
    24
colas@0
    25
| =hidefile= | if defined, will not show file in attachment table |
colas@0
    26
| =filepath= | |
colas@0
    27
| =filename= | |
colas@0
    28
| =filecomment= | comment to associate with file in attachment table |
colas@0
    29
| =createlink= | if defined, will create a link to file at end of topic |
colas@0
    30
| =changeproperties= | |
colas@0
    31
| =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=. |
colas@0
    32
colas@0
    33
Does the work of uploading a file to a topic. Designed to be useable for
colas@0
    34
a crude RPC (it will redirect to the 'view' script unless the
colas@0
    35
'noredirect' parameter is specified, in which case it will print a message to
colas@0
    36
STDOUT, starting with 'OK' on success and 'ERROR' on failure.
colas@0
    37
colas@0
    38