fires the moment you try to add file to uploader
$$("uploader_1").attachEvent("onBeforeFileAdd", function(item){
var type = item.type.toLowerCase();
if (type != "jpg" && type != "png"){
webix.message("Only PNG or JPG images are supported");
return false;
}
});