jeremy-ellis-tech / net-ipfs-http-client

.NET API client for the InterPlanetary File System (IPFS)
MIT License
78 stars 15 forks source link

IpfsClient.Add throws exception due to malformed JSON response #6

Closed slothbag closed 8 years ago

slothbag commented 8 years ago

A recent change in the IPFS API process for adding files is causing older API clients to receive double JSON resultsets like this:

{"Name":"file1.jpg","Bytes":12655}
{"Name":"file1.jpg","Hash":"QmSomeValidHashabc"}

I had this same error using go-ipfs-api, I updated to latest version and the problem went away. Unfortunately I didn't find out what the specific cause was,

Is it possible to get this library updated to work with the recent API changes?

slothbag commented 8 years ago

Ahh, found the cause.. It seems a progress = false param needs to be included. see https://github.com/ipfs/go-ipfs-api/commit/7c354892da3abdaafb6ac576c100b259b1a73dac

jeremy-ellis-tech commented 8 years ago

Hey Slothbag, thanks for letting me know. I'll patch this ASAP on develop.

jeremy-ellis-tech commented 8 years ago

@slothbag, I've pushed a quick fix to develop. Can you check it works on yours before I merge to master.

slothbag commented 8 years ago

Yeah, looks good! Tried it out and it works. Thanks.