{"action":"closed","issue":{"url":"https://api.github.com/repos/ccorcos/meteor-clientside-image-manipulation/issues/1","labels_url":"https://api.github.com/repos/ccorcos/meteor-clientside-image-manipulation/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/ccorcos/meteor-clientside-image-manipulation/issues/1/comments","events_url":"https://api.github.com/repos/ccorcos/meteor-clientside-image-manipulation/issues/1/events","html_url":"https://github.com/ccorcos/meteor-clientside-image-manipulation/issues/1","id":56522644,"number":1,"title":"request: integration w/ yogiben:autoform-file","user":{"login":"tintoverano","id":8960294,"avatar_url":"https://avatars.githubusercontent.com/u/8960294?v=3","gravatar_id":"","url":"https://api.github.com/users/tintoverano","html_url":"https://github.com/tintoverano","followers_url":"https://api.github.com/users/tintoverano/followers","following_url":"https://api.github.com/users/tintoverano/following{/other_user}","gists_url":"https://api.github.com/users/tintoverano/gists{/gist_id}","starred_url":"https://api.github.com/users/tintoverano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tintoverano/subscriptions","organizations_url":"https://api.github.com/users/tintoverano/orgs","repos_url":"https://api.github.com/users/tintoverano/repos","events_url":"https://api.github.com/users/tintoverano/events{/privacy}","received_events_url":"https://api.github.com/users/tintoverano/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-04T12:52:52Z","updated_at":"2015-02-08T15:27:24Z","closed_at":"2015-02-08T15:27:24Z","body":"hi,\r\n\r\nthanks for the package\r\n\r\nI tried to merge the two package without luck, I'm just kicking off w/ Meteor\r\n\r\n````\r\nTemplate.afFileUpload.events\r\n\t\"change .file-upload\": (e, t) ->\r\n    file = e.target.files[0]\r\n    if not file? then return\r\n\r\n    imgData = processImage file, 500, 500, (imgData) ->\r\n      newImg = new FS.File(imgData)\r\n\r\n      collection = getCollection(t.data)\r\n      collection.insert newImg, (err, fileObj) ->\r\n        if err\r\n          console.log err\r\n        else\r\n          name = $(e.target).attr('file-input')\r\n          # console.log $(e.target)\r\n          # console.log fileObj\r\n          $('input[name=\"' + name + '\"]').val(fileObj._id)\r\n          Session.set 'fileUploadSelected[' + name + ']', file.name\r\n          # console.log fileObj\r\n          refreshFileInput name\r\n````\r\n\r\ndo you think you could do a sample on how to do this?\r\n\r\nthanks a lot\r\n\r\ntinto"}}