kubo
kubo copied to clipboard
is that one super-powerful `ipfs.addAll` be possible?
is that one super-powerful ipfs.addAll be possible?
be able to add new files into the IPFS system, also add links to existing objects (with CID)
this is Javascript API, but need go-ipfs server side support first;
ipfs.addAll([
{ path: 'author-blog/index.html', content: 'top index content', },
{ path: 'author-blog/rss.xml', content: 'the updated top level rss', },
{ path: 'author-blog/new-post/index.html', content: 'the new blog post', },
{ path: 'author-blog/new-post/pic1.png', content: 'the new blog post's assets', },
{ path: 'author-blog/new-post/pic2.jpeg', content: 'the new blog post's assets', },
// ... and can ipfs.addAll support add existing CIDs?
{ path: 'author-blog/previous-post', link: CID.parse('another-existing-cid-from-previous-publication') },
{ path: 'author-blog/previous-post2', link: CID.parse('more-existing-cids') },
...
])
Originally posted by @tx0c in https://github.com/ipfs/kubo/issues/9294#issuecomment-1255338281
current alternative is:
ipfs.addAlladd all local files first,- then call
ipfs object patch add-link; (this is at least available) - or wait #4782
ipfs dag patch ...which was opened in 2018 but not sure for how long can be ready?