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

feat(files.add): update files.add API #56

Merged
merged 2 commits into from
Aug 12, 2016
Merged

Conversation

daviddias
Copy link
Contributor

@daviddias daviddias commented Aug 10, 2016

@haadcode
Copy link
Contributor

LGTM!

@@ -28,7 +28,8 @@ If no `content` is passed, then the path is treated as an empty directory
```js
{
path: '/tmp/myfile.txt',
node: DAGNode
hash: 'QmHash', // base58 encoded multihash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be a base58 encoded multihash. Looking at the future we are introducing cid + ipld soon. That means we have to break this interface at that point to a degree. This should be mulithash buffer/object something like that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I was thinking of that too, specially with the introduction of CID.

However, there will be a CID string version anyway, so the question emerges, do we have a raw multihash/CID or the string version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CIDs will allow for different versions of encoding, i.e. non base58. This interface though binds itself to using base58 which I find the most concerning part.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it. Right now, the content Ids are presented as base58 Encoded multihash, because there is no multibase nor multicodec. Once we have CID, the description will change to 'String representation of the CID', cause it is a self described Id :D

@daviddias
Copy link
Contributor Author

I'm finishing up the changes in js-ipfs-api. Please review these meanwhile if you can.

@daviddias
Copy link
Contributor Author

daviddias commented Aug 12, 2016

@@ -2,7 +2,7 @@
"name": "interface-ipfs-core",
"version": "0.7.2",
"description": "A test suite and interface you can use to implement a IPFS core interface.",
"main": "lib/index.js",
"main": "src/index.js",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change before merge :P

@dignifiedquire
Copy link
Contributor

except the two things above all lgtm

@daviddias
Copy link
Contributor Author

Thank you for the CR @dignifiedquire :):)

@daviddias daviddias merged commit 79ee353 into master Aug 12, 2016
@daviddias daviddias deleted the feat/upgrade-files.add branch August 12, 2016 20:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants