{"action":"created","issue":{"url":"https://api.github.com/repos/aheckmann/gridfs-stream/issues/47","labels_url":"https://api.github.com/repos/aheckmann/gridfs-stream/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/aheckmann/gridfs-stream/issues/47/comments","events_url":"https://api.github.com/repos/aheckmann/gridfs-stream/issues/47/events","html_url":"https://github.com/aheckmann/gridfs-stream/pull/47","id":42185018,"number":47,"title":"Let native stream implementation decide if stream can be paused","user":{"login":"ceari","id":250128,"avatar_url":"https://avatars.githubusercontent.com/u/250128?v=3","gravatar_id":"","url":"https://api.github.com/users/ceari","html_url":"https://github.com/ceari","followers_url":"https://api.github.com/users/ceari/followers","following_url":"https://api.github.com/users/ceari/following{/other_user}","gists_url":"https://api.github.com/users/ceari/gists{/gist_id}","starred_url":"https://api.github.com/users/ceari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceari/subscriptions","organizations_url":"https://api.github.com/users/ceari/orgs","repos_url":"https://api.github.com/users/ceari/repos","events_url":"https://api.github.com/users/ceari/events{/privacy}","received_events_url":"https://api.github.com/users/ceari/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":37,"created_at":"2014-09-08T11:04:05Z","updated_at":"2015-02-09T11:35:25Z","closed_at":"2014-10-23T07:15:44Z","pull_request":{"url":"https://api.github.com/repos/aheckmann/gridfs-stream/pulls/47","html_url":"https://github.com/aheckmann/gridfs-stream/pull/47","diff_url":"https://github.com/aheckmann/gridfs-stream/pull/47.diff","patch_url":"https://github.com/aheckmann/gridfs-stream/pull/47.patch"},"body":"Bypassing the native stream's pause behaviour can cause it to emit an\r\n'end' event before the last data chunk is emitted. Depending on the\r\nstream consumer, this leads to incomplete files being read from GridFS.\r\nFor example, when the stream is piped to an HTTP response, the response\r\nis terminated before the last chunk is sent.\r\n\r\nThe problem is described in more detail in issue #46 which also contains\r\na link to a script reproducing the problem. The problematic behaviour\r\noccurs randomly, probably depending on the order the chunks are read\r\n(or partially read) from MongoDB."},"comment":{"url":"https://api.github.com/repos/aheckmann/gridfs-stream/issues/comments/73494956","html_url":"https://github.com/aheckmann/gridfs-stream/pull/47#issuecomment-73494956","issue_url":"https://api.github.com/repos/aheckmann/gridfs-stream/issues/47","id":73494956,"user":{"login":"riaan53","id":7716342,"avatar_url":"https://avatars.githubusercontent.com/u/7716342?v=3","gravatar_id":"","url":"https://api.github.com/users/riaan53","html_url":"https://github.com/riaan53","followers_url":"https://api.github.com/users/riaan53/followers","following_url":"https://api.github.com/users/riaan53/following{/other_user}","gists_url":"https://api.github.com/users/riaan53/gists{/gist_id}","starred_url":"https://api.github.com/users/riaan53/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riaan53/subscriptions","organizations_url":"https://api.github.com/users/riaan53/orgs","repos_url":"https://api.github.com/users/riaan53/repos","events_url":"https://api.github.com/users/riaan53/events{/privacy}","received_events_url":"https://api.github.com/users/riaan53/received_events","type":"User","site_admin":false},"created_at":"2015-02-09T11:35:25Z","updated_at":"2015-02-09T11:35:25Z","body":"You can view the demo here: http://37.139.22.97:3000/\r\n\r\nIf you upload a new video you might have to refresh the page - the upload done check for this demo is done client side only and there is some server processing necessary to re-assemble the chunks after a upload. So if it request the range to soon it will be invalid but hey its only a demo :)\r\n\r\nLet me know what you think."}}