This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: support specify hash algorithm in files.add #1005
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
daviddias
previously approved these changes
Sep 8, 2017
daviddias
suggested changes
Sep 8, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
released ipfs-api 14.3.5
Thanks @alanshaw ! :)
src/core/components/object.js
Outdated
@@ -178,20 +164,19 @@ module.exports = function object (self) { | |||
} | |||
}), | |||
|
|||
get: promisify((multihash, options, callback) => { | |||
get: promisify((hash, options, callback) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same nitpick as js-ipfs-api, they follow the same interface :)
daviddias
approved these changes
Sep 8, 2017
@alanshaw do the tests fail to you locally as well? |
Yes these have failed for me too :( I'll take a look asap. |
@alanshaw this needs a rebase from master (things just moved around) |
daviddias
added a commit
that referenced
this pull request
Sep 8, 2017
* wip - incomplete feature -> #1005 * fix: swarm.peers - ensure that only peers connected are returned
dryajov
pushed a commit
that referenced
this pull request
Sep 12, 2017
* wip - incomplete feature -> #1005 * fix: swarm.peers - ensure that only peers connected are returned
@alanshaw are you available to finish this PR? |
daviddias
added
exp/expert
Having worked on the specific codebase is important
help wanted
Seeking public contribution on this issue
P2
Medium: Good to have, but can wait until someone steps up
status/ready
Ready to be worked
and removed
status/in-progress
In progress
labels
Jan 25, 2018
daviddias
changed the title
Support specify hash algorithm in files.add
feat: support specify hash algorithm in files.add
Feb 15, 2018
@hacdias wanna look into this one? |
vasco-santos
added
status/in-progress
In progress
and removed
status/ready
Ready to be worked
labels
Apr 9, 2018
vasco-santos
added
status/ready
Ready to be worked
status/in-progress
In progress
and removed
status/in-progress
In progress
status/ready
Ready to be worked
labels
Apr 9, 2018
Done on #1308 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
exp/expert
Having worked on the specific codebase is important
help wanted
Seeking public contribution on this issue
P2
Medium: Good to have, but can wait until someone steps up
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Specify multihash hashing alogrithm
This allows the optional param
--hash
(CLI) or?hash=
(HTTP API) to be passed tofiles.add
in order to specify the hash algorithm that should be used when generating the multihash(es) for the added content.Passing this option will set the CID version option to
true
, as per the Go implementation.Change
object/get
andobject/data
to accept CIDsThis brings js-ipfs more in line with go-ipfs. Where both
object/get
andobject/data
accept a CID. It's also needed byjs-ipfs-api
when adding files (see further discussion in ipfs-inactive/js-ipfs-http-client#597).requires ipfs-inactive/js-ipfs-unixfs-engine#185requires ipfs-inactive/js-ipfs-http-client#597