Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Cannot add multiple files from command line #1625

Closed
alanshaw opened this issue Oct 9, 2018 · 0 comments · Fixed by #1777
Closed

Cannot add multiple files from command line #1625

alanshaw opened this issue Oct 9, 2018 · 0 comments · Fixed by #1777
Assignees
Labels
exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up

Comments

@alanshaw
Copy link
Member

alanshaw commented Oct 9, 2018

screenshot 2018-10-09 at 10 57 17

@alanshaw alanshaw added kind/bug A bug in existing code (including security flaws) exp/novice Someone with a little familiarity can pick up status/ready Ready to be worked P1 High: Likely tackled by core team if no one steps up labels Oct 9, 2018
alanshaw pushed a commit that referenced this issue Dec 12, 2018
This PR adds a new method [`addFromFs`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromfs) allowing users to more easily add files from their file system without having to specify every single file to add.

In the browser the user will receive a "not available" error.

I've pulled out a module `glob-source.js` - call it with some file paths and it returns a pull stream source that can be piped to `ipfs.addPullStream`.

This PR comes with the following added benefits:

* `ipfs add` on the CLI uses `glob-source.js` - **nice and DRY**
* `glob-source.js` uses the events that the `glob` module provides allowing the globbing to be a `pull-pushable`, which means that matched paths can begin to be added before all the globbing is done - **faster**
* `ipfs add` now supports adding multiple paths, fixes #1625 - **better**
* `ipfs add --progress=false` doesn't calculate the total size of the files to be added anymore! It didn't need to do that as the total was completely discarded when progress was disabled. It means we can add BIGGER directories without running into memory issues - **stronger**

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
@alanshaw alanshaw mentioned this issue Dec 12, 2018
1 task
@ghost ghost assigned alanshaw Dec 12, 2018
@ghost ghost added status/in-progress In progress and removed status/ready Ready to be worked labels Dec 12, 2018
alanshaw pushed a commit that referenced this issue Dec 12, 2018
This PR adds a new method [`addFromFs`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromfs) allowing users to more easily add files from their file system without having to specify every single file to add.

In the browser the user will receive a "not available" error.

I've pulled out a module `glob-source.js` - call it with some file paths and it returns a pull stream source that can be piped to `ipfs.addPullStream`.

This PR comes with the following added benefits:

* `ipfs add` on the CLI uses `glob-source.js` - **nice and DRY**
* `glob-source.js` uses the events that the `glob` module provides allowing the globbing to be a `pull-pushable`, which means that matched paths can begin to be added before all the globbing is done - **faster**
* `ipfs add` now supports adding multiple paths, fixes #1625 - **better**
* `ipfs add --progress=false` doesn't calculate the total size of the files to be added anymore! It didn't need to do that as the total was completely discarded when progress was disabled. It means we can add BIGGER directories without running into memory issues - **stronger**

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
alanshaw pushed a commit that referenced this issue Dec 13, 2018
This PR adds a new method [`addFromFs`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromfs) allowing users to more easily add files from their file system without having to specify every single file to add.

In the browser the user will receive a "not available" error.

I've pulled out a module `glob-source.js` - call it with some file paths and it returns a pull stream source that can be piped to `ipfs.addPullStream`.

This PR comes with the following added benefits:

* `ipfs add` on the CLI uses `glob-source.js` - **nice and DRY**
* `glob-source.js` uses the events that the `glob` module provides allowing the globbing to be a `pull-pushable`, which means that matched paths can begin to be added before all the globbing is done - **faster**
* `ipfs add` now supports adding multiple paths, fixes #1625 - **better**
* `ipfs add --progress=false` doesn't calculate the total size of the files to be added anymore! It didn't need to do that as the total was completely discarded when progress was disabled. It means we can add BIGGER directories without running into memory issues - **stronger**

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
alanshaw pushed a commit that referenced this issue Dec 15, 2018
This PR adds a new method [`addFromFs`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromfs) allowing users to more easily add files from their file system without having to specify every single file to add.

In the browser the user will receive a "not available" error.

I've pulled out a module `glob-source.js` - call it with some file paths and it returns a pull stream source that can be piped to `ipfs.addPullStream`.

This PR comes with the following added benefits:

* `ipfs add` on the CLI uses `glob-source.js` - **nice and DRY**
* `glob-source.js` uses the events that the `glob` module provides allowing the globbing to be a `pull-pushable`, which means that matched paths can begin to be added before all the globbing is done - **faster**
* `ipfs add` now supports adding multiple paths, fixes #1625 - **better**
* `ipfs add --progress=false` doesn't calculate the total size of the files to be added anymore! It didn't need to do that as the total was completely discarded when progress was disabled. It means we can add BIGGER directories without running into memory issues - **stronger**

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
alanshaw pushed a commit that referenced this issue Dec 17, 2018
This PR adds a new method [`addFromFs`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromfs) allowing users to more easily add files from their file system without having to specify every single file to add.

In the browser the user will receive a "not available" error.

I've pulled out a module `glob-source.js` - call it with some file paths and it returns a pull stream source that can be piped to `ipfs.addPullStream`.

This PR comes with the following added benefits:

* `ipfs add` on the CLI uses `glob-source.js` - **nice and DRY**
* `glob-source.js` uses the events that the `glob` module provides allowing the globbing to be a `pull-pushable`, which means that matched paths can begin to be added before all the globbing is done - **faster**
* `ipfs add` now supports adding multiple paths, fixes #1625 - **better**
* `ipfs add --progress=false` doesn't calculate the total size of the files to be added anymore! It didn't need to do that as the total was completely discarded when progress was disabled. It means we can add BIGGER directories without running into memory issues - **stronger**

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
@ghost ghost removed the status/in-progress In progress label Dec 18, 2018
alanshaw pushed a commit that referenced this issue Dec 18, 2018
This PR adds a new method [`addFromFs`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromfs) allowing users to more easily add files from their file system without having to specify every single file to add.

In the browser the user will receive a "not available" error.

I've pulled out a module `glob-source.js` - call it with some file paths and it returns a pull stream source that can be piped to `ipfs.addPullStream`.

This PR comes with the following added benefits:

* `ipfs add` on the CLI uses `glob-source.js` - **nice and DRY**
* `glob-source.js` uses the events that the `glob` module provides allowing the globbing to be a `pull-pushable`, which means that matched paths can begin to be added before all the globbing is done - **faster**
* `ipfs add` now supports adding multiple paths, fixes #1625 - **better**
* `ipfs add --progress=false` doesn't calculate the total size of the files to be added anymore! It didn't need to do that as the total was completely discarded when progress was disabled. It means we can add BIGGER directories without running into memory issues - **stronger**

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) P1 High: Likely tackled by core team if no one steps up
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant