Not a developer? Go to



This callback is invoked for each file the user uploads to their blog via the XML-RPC API. This callback is similar to the CMSUploadFile callback found in MT::App::CMS.

Input Parameters

  • $cb - a reference to the current MT::Callback object handling this event.
  • $params - a hash reference containing a set of name/value pairs describing the file being uploaded.

The parameters passed in via the params input parameters are identified by the following keys:

  • File - The full physical file path of the uploaded file.
  • Url - The full URL to the file that has been uploaded.
  • Type - For this callback, this value is currently always ‘file’.
  • Blog - The MT::Blog object associated with the newly uploaded file.

Return Value


Example Handler

sub handler {
    my ($cb, $params) = @_;

Note: Currently, this callback is only used in MT::XMLRPCServer, since the MT::AtomServer app does not handle file uploads.