apiuploadimage
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::Callbackobject 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.
- Width - the width of the image
- Height - the height of the image
- ImageType - the mime type of the image (e.g. jpeg, png, gif, etc.)
Return Value
None.
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.