Open areijngoudt opened 8 years ago
Hey @areijngoudt this should be fixed in the version I just pushed which references my branch of ipfs-api@2.3.2 that fixes a bug with concat-ing binary strings -- https://github.com/ckeenan/node-ipfs-api/commit/62054e766e16bf77e5aa028192bef0a5bf55b1c3 . I added a browser and node test for fileType, but can you confirm this works for you?
Hi Cheeken,
This does not solve my problem. I'm retreiving an image (.jpg) file. requestAPI leaves the function on line: 53 if (stream && !buffer) return cb(null, res)
So the buffer.type is still undefined
Best regards, Ad
2016-03-29 18:20 GMT+02:00 ckeenan notifications@github.com:
Hey @areijngoudt https://github.com/areijngoudt this should be fixed in the version I just pushed which references my branch of ipfs-api@2.3.2 that fixes a bug with concat-ing binary strings -- ckeenan/node-ipfs-api@ 62054e7 https://github.com/ckeenan/node-ipfs-api/commit/62054e766e16bf77e5aa028192bef0a5bf55b1c3 . I added a browser and node test for fileType, but can you confirm this works for you?
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/ConsenSys/ipfs.js/issues/7#issuecomment-202983104
When I add an image (.jpg) in IPFS, the buffer contains type image/jpeg. When I retrieve it via ipfs.cat, the buffer does not contain the type (it's undefined).