{"action":"created","issue":{"url":"https://api.github.com/repos/VeliovGroup/meteor-autoform-file/issues/5","repository_url":"https://api.github.com/repos/VeliovGroup/meteor-autoform-file","labels_url":"https://api.github.com/repos/VeliovGroup/meteor-autoform-file/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/VeliovGroup/meteor-autoform-file/issues/5/comments","events_url":"https://api.github.com/repos/VeliovGroup/meteor-autoform-file/issues/5/events","html_url":"https://github.com/VeliovGroup/meteor-autoform-file/issues/5","id":169410892,"number":5,"title":"Getting an error with the published version","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":[{"url":"https://api.github.com/repos/VeliovGroup/meteor-autoform-file/labels/bug","name":"bug","color":"ee0701"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":37,"created_at":"2016-08-04T16:01:16Z","updated_at":"2016-10-12T09:18:11Z","closed_at":"2016-08-04T17:59:56Z","body":"```\r\nException in template helper: TypeError: Cannot read property 'find' of undefined\r\n    at Object.uploadedFile (http://localhost:3000/packages/ostrio_autoform-files.js?hash=e71cbd4cce6282f7012a072add14293ffd54f877:138:60)\r\n    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2994:16\r\n    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1653:16\r\n    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3046:66\r\n    at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3687:12)\r\n    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3045:27\r\n    at Object.Spacebars.dot (http://localhost:3000/packages/spacebars.js?hash=65db8b6a8e3fca189b416de702967b1cb83d57d5:234:13)\r\n    at http://localhost:3000/packages/ostrio_autoform-files.js?hash=e71cbd4cce6282f7012a072add14293ffd54f877:72:65\r\n    at .<anonymous> (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2677:44)\r\n    at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1875:20\r\n```\r\n\r\nMy code: \r\n\r\n```js\r\nimport { FilesCollection } from 'meteor/ostrio:files';\r\n\r\nconst Images = new FilesCollection({\r\n  collectionName: 'Images',\r\n  allowClientCode: false, // Disallow remove files from Client,\r\n  onBeforeUpload(file) {\r\n    // Allow upload files under 10MB, and only in png/jpg/jpeg formats\r\n    if (file.size <= 10485760 && /png|jpg|jpeg/i.test(file.ext)) {\r\n      return true;\r\n    }\r\n    return 'Please upload image, with size equal or less than 10MB';\r\n  },\r\n});\r\n\r\nexport default Images;\r\n```\r\n\r\nand then in the schema\r\n\r\n```js\r\npicture: {\r\n  type: String,\r\n  autoform: {\r\n    afFieldInput: {\r\n      type: 'fileUpload',\r\n      collection: 'Images',\r\n    },\r\n  },\r\n},\r\n```"},"comment":{"url":"https://api.github.com/repos/VeliovGroup/meteor-autoform-file/issues/comments/253161917","html_url":"https://github.com/VeliovGroup/meteor-autoform-file/issues/5#issuecomment-253161917","issue_url":"https://api.github.com/repos/VeliovGroup/meteor-autoform-file/issues/5","id":253161917,"user":{"login":"dr-dimitru","id":1686778,"avatar_url":"https://avatars.githubusercontent.com/u/1686778?v=3","gravatar_id":"","url":"https://api.github.com/users/dr-dimitru","html_url":"https://github.com/dr-dimitru","followers_url":"https://api.github.com/users/dr-dimitru/followers","following_url":"https://api.github.com/users/dr-dimitru/following{/other_user}","gists_url":"https://api.github.com/users/dr-dimitru/gists{/gist_id}","starred_url":"https://api.github.com/users/dr-dimitru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dr-dimitru/subscriptions","organizations_url":"https://api.github.com/users/dr-dimitru/orgs","repos_url":"https://api.github.com/users/dr-dimitru/repos","events_url":"https://api.github.com/users/dr-dimitru/events{/privacy}","received_events_url":"https://api.github.com/users/dr-dimitru/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T09:18:11Z","updated_at":"2016-10-12T09:18:11Z","body":"@i-siddiq \r\nUpload is aborted on `onBeforeUpload` remove it for test purposes."}}
{"actor":{"display_login":"dr-dimitru"}}