{"action":"created","issue":{"url":"https://api.github.com/repos/djhi/meteor-autoform-file-materialize/issues/1","labels_url":"https://api.github.com/repos/djhi/meteor-autoform-file-materialize/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/djhi/meteor-autoform-file-materialize/issues/1/comments","events_url":"https://api.github.com/repos/djhi/meteor-autoform-file-materialize/issues/1/events","html_url":"https://github.com/djhi/meteor-autoform-file-materialize/issues/1","id":69126318,"number":1,"title":"Does not clear after insert","user":{"login":"benjick","id":430872,"avatar_url":"https://avatars.githubusercontent.com/u/430872?v=3","gravatar_id":"","url":"https://api.github.com/users/benjick","html_url":"https://github.com/benjick","followers_url":"https://api.github.com/users/benjick/followers","following_url":"https://api.github.com/users/benjick/following{/other_user}","gists_url":"https://api.github.com/users/benjick/gists{/gist_id}","starred_url":"https://api.github.com/users/benjick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjick/subscriptions","organizations_url":"https://api.github.com/users/benjick/orgs","repos_url":"https://api.github.com/users/benjick/repos","events_url":"https://api.github.com/users/benjick/events{/privacy}","received_events_url":"https://api.github.com/users/benjick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-17T12:08:22Z","updated_at":"2015-08-02T16:49:49Z","closed_at":null,"body":"Hey\r\n\r\nThe image doesn't clear after insert (the preview), but it can't be used again. \r\n\r\nSee image below\r\n\r\n![2015-04-17 14_07_44-infoadmin](https://cloud.githubusercontent.com/assets/430872/7201756/2cbabc08-e50b-11e4-9a3d-c49b6cdbff8b.png)\r\n"},"comment":{"url":"https://api.github.com/repos/djhi/meteor-autoform-file-materialize/issues/comments/127043055","html_url":"https://github.com/djhi/meteor-autoform-file-materialize/issues/1#issuecomment-127043055","issue_url":"https://api.github.com/repos/djhi/meteor-autoform-file-materialize/issues/1","id":127043055,"user":{"login":"ryanbuiltthat","id":7276902,"avatar_url":"https://avatars.githubusercontent.com/u/7276902?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanbuiltthat","html_url":"https://github.com/ryanbuiltthat","followers_url":"https://api.github.com/users/ryanbuiltthat/followers","following_url":"https://api.github.com/users/ryanbuiltthat/following{/other_user}","gists_url":"https://api.github.com/users/ryanbuiltthat/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanbuiltthat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanbuiltthat/subscriptions","organizations_url":"https://api.github.com/users/ryanbuiltthat/orgs","repos_url":"https://api.github.com/users/ryanbuiltthat/repos","events_url":"https://api.github.com/users/ryanbuiltthat/events{/privacy}","received_events_url":"https://api.github.com/users/ryanbuiltthat/received_events","type":"User","site_admin":false},"created_at":"2015-08-02T16:49:49Z","updated_at":"2015-08-02T16:49:49Z","body":"I had this issue too. My solution is pretty hacky and I hope a better one can be found but this seems to work for now. \r\n\r\nMy form is set to use a method, that method returns true if successful. I then just added a hook to the form and if true programatically trigger the `click` even on the Remove Image link. Like I said it's pretty hacky but gets the job done.\r\n\r\n    var myHooks = {\r\n        onSuccess: function(formType, result) {\r\n            if(result){\r\n                $(\".file-upload-clear\").trigger(\"click\");\r\n            }\r\n        }\r\n    };\r\n\r\n\r\n    AutoForm.hooks({\r\n        myForm: myHooks\r\n    });\r\n\r\nHope this helps!"}}