Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

block.rm() is missing :( #792

Closed
mikeal opened this issue Jun 22, 2018 · 8 comments
Closed

block.rm() is missing :( #792

mikeal opened this issue Jun 22, 2018 · 8 comments

Comments

@mikeal
Copy link
Contributor

mikeal commented Jun 22, 2018

Was surprised to find that this API was missing. It's in the go ipfs command line but isn't in js-ipfs-api and isn't documented in https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/BLOCK.md

@daviddias
Copy link
Contributor

daviddias commented Jun 25, 2018

Interesting, this must be new. I remember specifically implementing this endpoint for js-ipfs and then later removing as go-ipfs team was uncomfortable (@whyrusleeping) having a command that would delete something from the store without passing through the pinning/gc.

It seems it got added meanwhile. @whyrusleeping @Stebalien shall we just implement it? This is a quick one :)

@whyrusleeping
Copy link
Contributor

@diasdavid yeah. The command was implemented with the caveat that it do a pin check on that hash. Which makes it really slow.

@whyrusleeping
Copy link
Contributor

In general, if youre using ipfs block rm its likely you are doing something wrong.

@mikeal
Copy link
Contributor Author

mikeal commented Jun 25, 2018

That's good to know, and should probably be in the docs. It means that, for the specific use case I had for this, it's actually not usable.

@whyrusleeping
Copy link
Contributor

Yeah, and i just noticed a typo in the helptext too. Ripe for a PR

@0x-r4bbit
Copy link

Hi,

maybe I can help out with this one. Do I get it right that everybody here agreed block.rm() should be implemented?

I'm not super familiar with the Block APIs yet, but I can read it up and give it a spin.

@0x-r4bbit
Copy link

Alright, I looked into what a Block is and it turns out that this should be a trivial thing to do. In fact, block.rm() is implemented in js-ipfs and pretty straight forward.

It's not as straight forward in js-ipfs-api though as we'll have to send a request to a node to perform the deletion. While there's APIs to send single files or multiple files, there's no API yet to perform a deletion request.

Is sendRequest() the API we wanna use for that?

Any pointers would be appreciated :)

Thanks!

Prabhakar-Poudel pushed a commit to Prabhakar-Poudel/js-ipfs-http-client that referenced this issue Jun 1, 2019
docs: update readme

fixes ipfs-inactive#792

License: MIT
Signed-off-by: Prabhakar-Poudel <[email protected]>
Prabhakar-Poudel pushed a commit to Prabhakar-Poudel/js-ipfs-http-client that referenced this issue Jun 1, 2019
docs: update readme

fixes ipfs-inactive#792

License: MIT
Signed-off-by: Prabhakar-Poudel <[email protected]>
Prabhakar-Poudel pushed a commit to Prabhakar-Poudel/js-ipfs-http-client that referenced this issue Jun 3, 2019
increase bundle size, as the size exceeds limit

docs: update readme

fixes ipfs-inactive#792

License: MIT
Signed-off-by: Prabhakar-Poudel <[email protected]>
Prabhakar-Poudel pushed a commit to Prabhakar-Poudel/js-ipfs-http-client that referenced this issue Jun 3, 2019
docs: update readme

fixes ipfs-inactive#792

License: MIT
Signed-off-by: Prabhakar-Poudel <[email protected]>
Prabhakar-Poudel pushed a commit to Prabhakar-Poudel/js-ipfs-http-client that referenced this issue Jun 30, 2019
docs: update readme

fixes ipfs-inactive#792

License: MIT
Signed-off-by: Prabhakar-Poudel <[email protected]>
@alanshaw
Copy link
Contributor

alanshaw commented Nov 5, 2019

resolved in #1123

@alanshaw alanshaw closed this as completed Nov 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants