See 
PublishedAPI for packages intended to be used by Plugin and Contrib authors, or 
browse all packages.
See also 
Developing plugins, 
Developer's Bible, 
Technical Overview
  internal package Foswiki::UI::Upload  
UI delegate for attachment management functions
 StaticMethod upload( $session ) 
upload command handler.
This method is designed to be
invoked via the 
UI::run method.
CGI parameters, passed in $query:
Does the work of uploading an attachment to a topic.
 
-  hidefile- if defined, will not show file in attachment table
-  filepath-
-  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 inconfigure. The parameter value can be aTopicName, aWeb.TopicName, or a URL. Redirect to a URL only works     if it is enabled inconfigure, and is ignored ifnoredirectis     specified.
-  noredirect- Normally it will redirect to 'view' when the upload is     complete, but also designed to be useable for REST-style calling using     the 'noredirect' parameter. If this parameter is set it will return an     appropriate HTTP status code and print a message to STDOUT, starting     with 'OK' on success and 'ERROR' on failure.