You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
We're in the process of unifying the js-ipfs and js-ipfs-api APIs to be consistent, provided by the interface-ipfs-core interface. For the roadmap, see this issue.
Part of this process is identifying what API calls from js-ipfs-api should be part of the IPFS Core API, and which are auxiliary functions that aren't specific to the core.
Proposed Change
One such API call from js-ipfs-api that doesn't fit well into Core is the ability to add a file or directory using add. Core needs to be as agnostic as possible, and shouldn't be responsible for interacting with the underlying file system at all (think browser support).
This is useful functionality to have though, so I suggest moving the file/directory adding logic into a separate method on the API, like addFiles, which can perform the filesystem operations within this module, and translate them to an array of streams and paths to be handed over to the Core API.
Steps
remove file/directory adding from add
introduce a new api call that does adding files from the local filesystem (addFiles)
remove url adding from add
introduce a new api call that does adding files from a URL (addURL)
use interface-ipfs-core for testing add
bump a major semver to make it clear that this is a breaking change
Background
We're in the process of unifying the js-ipfs and js-ipfs-api APIs to be consistent, provided by the interface-ipfs-core interface. For the roadmap, see this issue.
Part of this process is identifying what API calls from js-ipfs-api should be part of the IPFS Core API, and which are auxiliary functions that aren't specific to the core.
Proposed Change
One such API call from js-ipfs-api that doesn't fit well into Core is the ability to add a file or directory using add. Core needs to be as agnostic as possible, and shouldn't be responsible for interacting with the underlying file system at all (think browser support).
This is useful functionality to have though, so I suggest moving the file/directory adding logic into a separate method on the API, like
addFiles
, which can perform the filesystem operations within this module, and translate them to an array of streams and paths to be handed over to the Core API.Steps
add
addFiles
)add
addURL
)add
ping @diasdavid @nginnever @dignifiedquire
The text was updated successfully, but these errors were encountered: