3 ms·
For context: IPFS is a distributed content-addressable storage system that is web compatible. If you want to learn how to use IPFS directly (i.e. without using
by jstanley 9y ago
For context: IPFS is a distributed content-addressable storage system that is web compatible. If you want to learn how to use IPFS directly (i.e. without using and trusting a public gateway), start with the Getting Started guide: https://ipfs.io/docs/getting-started/ https://ipfs.io/docs/getting-started/
(I'm not the OP, but) If you want to use IPFessay without installing IPFS, you can use it on my hardbin.com public writable gateway (most gateways are not writable) at:
https://hardbin.com/ipfs/QmQUrYJ6sCSDV6duC4Db7U8NXZG3DpNrVF77XtcrbWYiJY https://hardbin.com/ipfs/QmQUrYJ6sCSDV6duC4Db7U8NXZG3DpNrVF7...
and the sample essay:
https://hardbin.com/ipfs/QmWFSuFDaApxK6DaBzEXdSXhb325fQY1hHn7Jc32DS77UK https://hardbin.com/ipfs/QmWFSuFDaApxK6DaBzEXdSXhb325fQY1hHn...
And if you want your resulting essay to stick around, you can pay a service like ipfsstore.it to pin it for you: http://ipfsstore.it/ http://ipfsstore.it/
EDIT: It doesn't actually work on my public gateway because it uses the IPFS node API instead of the standard writable gateway API. I'll submit a pull request to make it use the normal writable gateway API tomorrow.
EDIT2: StavrosK has updated it to use the gateway API! I updated the hash link so it does now work :)
- StavrosK 9y agoHey, 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.
- jstanley 9y agoIt's not my API, it's the standard IPFS writable gateway API, documented here: https://discuss.ipfs.io/t/writeable-http-gateways/210 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 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 https://github.com/ipfs/go-ipfs/pull/3931 but ran out of steam - hopefully I'll continue soon.
- StavrosK 9y agoSorry, 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.
- jstanley 9y agoExcellent! I updated my comment. > Here's the permanent, immutable IPFS link to your essay: > /ipfsQmZo1JgakWB2ZYrA75P3b7eZxvwP1vKpDw2y7WJJhj8j7p There's a "/" missing in here :)
- StavrosK 9y agoFixed, thanks! I have taken the liberty of linking things to hardbin.com, including the IPNS link: https://hardbin.com/ipns/QmSWnBwMKZ28tcgMFdihD8XS7p6QzdRSGf71cCybaETSsU/ https://hardbin.com/ipns/QmSWnBwMKZ28tcgMFdihD8XS7p6QzdRSGf7... Thanks for your help!