{"action":"opened","issue":{"url":"https://api.github.com/repos/flowjs/ng-flow/issues/305","repository_url":"https://api.github.com/repos/flowjs/ng-flow","labels_url":"https://api.github.com/repos/flowjs/ng-flow/issues/305/labels{/name}","comments_url":"https://api.github.com/repos/flowjs/ng-flow/issues/305/comments","events_url":"https://api.github.com/repos/flowjs/ng-flow/issues/305/events","html_url":"https://github.com/flowjs/ng-flow/issues/305","id":175436918,"number":305,"title":"$scope.$on('flow::fileAdded'.. doesn't work","user":{"login":"hank-hong","id":15545621,"avatar_url":"https://avatars.githubusercontent.com/u/15545621?v=3","gravatar_id":"","url":"https://api.github.com/users/hank-hong","html_url":"https://github.com/hank-hong","followers_url":"https://api.github.com/users/hank-hong/followers","following_url":"https://api.github.com/users/hank-hong/following{/other_user}","gists_url":"https://api.github.com/users/hank-hong/gists{/gist_id}","starred_url":"https://api.github.com/users/hank-hong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hank-hong/subscriptions","organizations_url":"https://api.github.com/users/hank-hong/orgs","repos_url":"https://api.github.com/users/hank-hong/repos","events_url":"https://api.github.com/users/hank-hong/events{/privacy}","received_events_url":"https://api.github.com/users/hank-hong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-07T07:57:52Z","updated_at":"2016-09-07T07:57:52Z","closed_at":null,"body":"The version I used is: \r\nangular ~1.2.0\r\nng-flow ~2\r\n\r\nHTML : \r\n```\r\n<div flow-init=\"{singleFile:true}\" \r\n        flow-file-added=\"handlerFileAdded($file, $event, $flow)\" >\r\n           <img style=\"max-height:60px;\" flow-img=\"$flow.files[0]\" />\r\n           <span class=\"btn btn-info\" flow-btn flow-attrs=\"{accept:'image/*'}\" >Upload</span>\r\n</div>\r\n```\r\n\r\nJS:\r\n```\r\n$scope.$on('flow::fileAdded', function (event, flow, file) {\r\n    if(file.size > (1024*1024)){\r\n       log.error('The size of image should be less than 1M');\r\n    }\r\n });\r\n```\r\nI want to avoid upload the file whose size is larger than 1M.\r\nBut the event \"on\" won't listen to the event \"flow::fileAdded\", this method won't be triggered.\r\nCould someone please help me to resolve it?\r\n\r\nThanks\r\n"}}
{"actor":{"display_login":"hank-hong"}}