Not a developer? Go to MovableType.com

Documentation

MT::App::CMS::cmsuploadimage

This callback is invoked just after an image has been uploaded. It passes to the handler information about the image that was uploaded so that additional information can be gathered, or additional transformations can be applied to the image.

Input Parameters

  • $cb - a reference to the current MT::Callback object handling this event.
  • $params - a hash ref containing information about the uploaded file.

The following are the keys of the parameter ($params) hash passed into the handler as input:

  • File or file - a link to the file on the filesystem
  • Url or url - the URL to the file
  • Size or size - the size of the file in bytes
  • Asset or asset - a reference to the MT::Asset object
  • Type or type - the type of asset
  • Blog or blog - the blog ID
  • Width or width - the width of the image
  • Height or height - the height of the image
  • ImageType or image_type - the mime type of the image (e.g. jpeg, png, gif, etc.)

Return Value

None.

Example Handler

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

Leave a Comment