-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object or DAG API? is there one API to patch multiple links in a single call? can suggest such a feature if not exist yet? #9294
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
The Object API is deprecated and we plan on removing it soon. To unblock yourself immediately, you can use MFS instead. We're also working on |
is that one super-powerful be possible? 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') },
...
]) |
@guseggert oh man, this was closed too fast, at least give it some days discussion?
#9301 (comment) hope it can still have a period for a thorough discussion? at least keep it open for a few days? |
it was opened in 2018, but for how long should we wait to be able see it in production? for now there's only |
MFS currently cannot replace Object API, since we cannot add an existing CID to an object without copying the remote content to the local machine. Deprecating Object API without Can this issue be reopened since it has not been resolved? |
Checklist
Description
I see from #7936 (comment)
but
the
ipfs object patch add-link ...
(and the according js API) just work, but it still can only patch one link at each call,just wonder is there one API to patch multiple links in a single call?
https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-object-patch-add-link
https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/OBJECT.md#ipfsobjectpatchaddlinkcid-link-options
in js http-client API like this?
even with the FILES API, I don't find such an API can do, the example says use this instead, but
files cp
can still do one link at a time, would be translated to one ipfs call for each new file addition, not cool, and might be slowmy use case is in an IPFS based blog publishing system:
index.html
and some picture assets, published in a ipfs directory,you can see, at time of each new post publication, will need to add some new files (top level rss.xml and the new post), and together with old existing CIDs as sub-directories,
Ideally, if the
ipfs.addAll
can support that mixed use of uploading new files, and existing CIDs would be the best solution:https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsaddallsource-options
can this API be made possible? (I believe this can have many other use cases beyond my example of IPFS blog publishing)
The text was updated successfully, but these errors were encountered: