Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hey, thanks! Can we make it use your API by default, or perhaps as a fallback?

I'm not sure what the difference between the Node API and the Gateway API is, I had to hack around this by reading the js-ipfs code. If there's a better way to interface with the gateway without including the entire js-ipfs 2.5 MB file, please let me know.



It's not my API, it's the standard IPFS writable gateway API, documented here: https://discuss.ipfs.io/t/writeable-http-gateways/210

And there's an example usage here: https://github.com/jes/hardbin/blob/master/js/hardbin.js#L25

There is currently a bug which means you first need to DELETE the filename (in my case "content") that you are trying to replace if it already exists, but apart from that it is straightforward.

I started fixing the bug here https://github.com/ipfs/go-ipfs/pull/3931 but ran out of steam - hopefully I'll continue soon.


Sorry, I meant your gateway. Thanks for the documentation, I had no idea this existed. I'll have a look, but if you already know how to use this API and would like to issue a MR, I'd be grateful.

EDIT: I have updated it to use the Gateway API, thanks for letting me know.


Excellent! I updated my comment.

> Here's the permanent, immutable IPFS link to your essay: > /ipfsQmZo1JgakWB2ZYrA75P3b7eZxvwP1vKpDw2y7WJJhj8j7p

There's a "/" missing in here :)


Fixed, thanks! I have taken the liberty of linking things to hardbin.com, including the IPNS link:

https://hardbin.com/ipns/QmSWnBwMKZ28tcgMFdihD8XS7p6QzdRSGf7...

Thanks for your help!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: