{"action":"created","issue":{"url":"https://api.github.com/repos/rricard/mongoose-fs/issues/6","labels_url":"https://api.github.com/repos/rricard/mongoose-fs/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/rricard/mongoose-fs/issues/6/comments","events_url":"https://api.github.com/repos/rricard/mongoose-fs/issues/6/events","html_url":"https://github.com/rricard/mongoose-fs/pull/6","id":63402957,"number":6,"title":"Synchronized RetrieveBlob() and pre save with promises.","user":{"login":"dlemon","id":6570503,"avatar_url":"https://avatars.githubusercontent.com/u/6570503?v=3","gravatar_id":"","url":"https://api.github.com/users/dlemon","html_url":"https://github.com/dlemon","followers_url":"https://api.github.com/users/dlemon/followers","following_url":"https://api.github.com/users/dlemon/following{/other_user}","gists_url":"https://api.github.com/users/dlemon/gists{/gist_id}","starred_url":"https://api.github.com/users/dlemon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlemon/subscriptions","organizations_url":"https://api.github.com/users/dlemon/orgs","repos_url":"https://api.github.com/users/dlemon/repos","events_url":"https://api.github.com/users/dlemon/events{/privacy}","received_events_url":"https://api.github.com/users/dlemon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-21T13:27:33Z","updated_at":"2015-03-26T01:09:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rricard/mongoose-fs/pulls/6","html_url":"https://github.com/rricard/mongoose-fs/pull/6","diff_url":"https://github.com/rricard/mongoose-fs/pull/6.diff","patch_url":"https://github.com/rricard/mongoose-fs/pull/6.patch"},"body":"When testing mongoose-fs with my application running mongodb 3.0 on Windows, I noticed that retrieveBlobs  came back too early, so my grid-fs keys in the document were always undefined. The same synchronization issue I observed for a save.\r\n\r\nI have synchronized the retrieveBlobs() and pre-save with Promises to resolve this issue. If interested you can pull them in into your master branch. Dependency is shifted to node >=0.12. Promises are now native to node from this version on.\r\n\r\nI have modified the JSON package, because I needed to get this fix out to npm (developers are working on a web application that needs to store large files. The developers are located across the world).\r\n\r\nIf you opt to pull in the change, then please modify the JSON package, and I will remove the fork/npm package.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/rricard/mongoose-fs/issues/comments/86274339","html_url":"https://github.com/rricard/mongoose-fs/pull/6#issuecomment-86274339","issue_url":"https://api.github.com/repos/rricard/mongoose-fs/issues/6","id":86274339,"user":{"login":"dlemon","id":6570503,"avatar_url":"https://avatars.githubusercontent.com/u/6570503?v=3","gravatar_id":"","url":"https://api.github.com/users/dlemon","html_url":"https://github.com/dlemon","followers_url":"https://api.github.com/users/dlemon/followers","following_url":"https://api.github.com/users/dlemon/following{/other_user}","gists_url":"https://api.github.com/users/dlemon/gists{/gist_id}","starred_url":"https://api.github.com/users/dlemon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlemon/subscriptions","organizations_url":"https://api.github.com/users/dlemon/orgs","repos_url":"https://api.github.com/users/dlemon/repos","events_url":"https://api.github.com/users/dlemon/events{/privacy}","received_events_url":"https://api.github.com/users/dlemon/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T01:09:05Z","updated_at":"2015-03-26T01:09:05Z","body":"Hi Robin,\r\n\r\nI have restored the dependency on node >= 0.10. Added a dependency on the npm module q, With this module I have implemented the promises. All tests run fine. This should do the trick.\r\n\r\nFor a project I also had to downgrade to 0.10 for dependency on kerberos authentication modules. I was suprised that 0.10 indeed has a large installation base, and 0.12 is really too early adopted by me.\r\n\r\nAnyways, look at the changes and let me know what you think.\r\n\r\nThanks!"}}