Javascript Event System - media-add-success

From KickApps Documentation

Jump to: navigation, search

This article pertains to the Javascript Event System. You can refer to our list of Javascript Event System Supported Events to learn what else you can do with our event system.

Contents

Summary

This event is fired on the media list page after a media item has been uploaded.

Payload Parameters

mediaName
(string) The name of the new media item
mediaId
(string) The media ID of the new media item
mediaType
(string) The type of media uploaded
pathToMedia
(string) The path to the media
pathToPreview
(string) The path to the media thumbnail


Execution Interruption

none

Example

function onMediaAddSuccess(data) {

   // do something here
   console.log(data.mediaName, data.mediaId, data.mediaType, data.pathToMedia, data.pathToPreview)

} var newEventId = Ka.events.listen('media-add-success', onMediaAddSuccess);