{"action":"created","issue":{"url":"https://api.github.com/repos/bitinn/node-fetch/issues/213","repository_url":"https://api.github.com/repos/bitinn/node-fetch","labels_url":"https://api.github.com/repos/bitinn/node-fetch/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/bitinn/node-fetch/issues/213/comments","events_url":"https://api.github.com/repos/bitinn/node-fetch/issues/213/events","html_url":"https://github.com/bitinn/node-fetch/issues/213","id":193665401,"number":213,"title":"Uploading Streaming Binary Data using Node Fetch","user":{"login":"pianeer","id":380173,"avatar_url":"https://avatars.githubusercontent.com/u/380173?v=3","gravatar_id":"","url":"https://api.github.com/users/pianeer","html_url":"https://github.com/pianeer","followers_url":"https://api.github.com/users/pianeer/followers","following_url":"https://api.github.com/users/pianeer/following{/other_user}","gists_url":"https://api.github.com/users/pianeer/gists{/gist_id}","starred_url":"https://api.github.com/users/pianeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pianeer/subscriptions","organizations_url":"https://api.github.com/users/pianeer/orgs","repos_url":"https://api.github.com/users/pianeer/repos","events_url":"https://api.github.com/users/pianeer/events{/privacy}","received_events_url":"https://api.github.com/users/pianeer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-12-06T02:17:43Z","updated_at":"2016-12-14T23:42:53Z","closed_at":"2016-12-14T23:42:53Z","body":"I have a question on how to go about uploading content to an endpoint that accepts only binary data. I have the file on disk and want to stream the content as binary but am having difficulties using `node-fetch`. Here is some sample code of what I'm trying to do. Any pointers would help, I don't know if this is an issue with node fetch not being able to support binary streams or my usage of it not being accurate:\r\n\r\n```js\r\n  const bodyData = fs.createReadStream(req.file.path) // file stored locally on disk\r\n  return fetch(uploadEndpoint, {\r\n    method: 'POST',\r\n    headers: {\r\n      'Authorization': `Bearer ${token}`,\r\n      'Content-Type': req.file.mimetype\r\n    },\r\n    body: bodyData\r\n  })\r\n```\r\n\r\nAny pointers would help!"},"comment":{"url":"https://api.github.com/repos/bitinn/node-fetch/issues/comments/267192058","html_url":"https://github.com/bitinn/node-fetch/issues/213#issuecomment-267192058","issue_url":"https://api.github.com/repos/bitinn/node-fetch/issues/213","id":267192058,"user":{"login":"TimothyGu","id":1538624,"avatar_url":"https://avatars.githubusercontent.com/u/1538624?v=3","gravatar_id":"","url":"https://api.github.com/users/TimothyGu","html_url":"https://github.com/TimothyGu","followers_url":"https://api.github.com/users/TimothyGu/followers","following_url":"https://api.github.com/users/TimothyGu/following{/other_user}","gists_url":"https://api.github.com/users/TimothyGu/gists{/gist_id}","starred_url":"https://api.github.com/users/TimothyGu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TimothyGu/subscriptions","organizations_url":"https://api.github.com/users/TimothyGu/orgs","repos_url":"https://api.github.com/users/TimothyGu/repos","events_url":"https://api.github.com/users/TimothyGu/events{/privacy}","received_events_url":"https://api.github.com/users/TimothyGu/received_events","type":"User","site_admin":false},"created_at":"2016-12-14T23:42:53Z","updated_at":"2016-12-14T23:42:53Z","body":"Timed out."}}
{"actor":{"display_login":"TimothyGu"}}