-
Notifications
You must be signed in to change notification settings - Fork 299
feat: only-hash option for add/addFromFS/addFromURL #700
Conversation
…ns were passed but tests seem happy with it.
Does this also support
|
I was thinking that alias support like that is only available through a CLI, (js-ipfs here). Should this API also support aliases? Please explain if I'm missing something, but would you expect |
Ah I'm sorry, I didn't notice we're in js-ipfs-api |
Haha, no worries 😉. Thanks for the look-over, though. |
CI question: Does anyone know why ESLint finds errors but doesn't report them here? This has tricked me a few times, I think. |
Actually: maybe. go-ipfs supports option aliases on the API, e.g. |
But again this is just options objects passed to an API function yeah? Then probably not. |
Cool, I think js-ipfs could change that as a mild |
CI is failing on object.patch tests: https://travis-ci.org/ipfs/js-ipfs-api/jobs/345383716#L3541 These tests do not fail locally but are also failing on VMX's most recent PR: #701. |
Alias are supported for some methods (early days) but we decided to bet on the full options names for docs and tests. (Aliases mean + docs and + dup tests) |
@vmx could https://github.com/ipld/js-ipld-dag-pb/releases/tag/v0.13.1 be breaking the tests? HAven't looked too much into it. |
@diasdavid: Nope, I've just publish js-ipld-dag-pb 0.13.1 just 30mins ago. |
…querystring options flatly and util/* code passes it under the 'qs' property, requiring this flattening. files/* should probably send options under 'qs'.
Current status: ready for review / merge. CI failure is The |
…eam' under the 'qs' key. Allows any options passed to ipfs.file|pin.add-ish to be turned into qs params instead of adding all of them individually
@diasdavid No reason. It is not a different Github account, just a local |
@JonKrone please rebase master onto this branch when you have a chance. |
@JonKrone merging this branch into a branch of the repo itself so that we can collaborate |
* feat: only-hash option for add/addFromFS/addFromURL (#700) * chore: update ipfsd-ctl
This adds
only-hash
as a potential querystring arg for files.add, util.addFromFS, and util.addFromURL:ipfs.add(<content>, { only-hash: true })
.only-hash allows users to generate a hash for some content without actually adding the content to ipfs.
related issue: #509
needed for js-ipfs: ipfs/js-ipfs#1233