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

fix regression on files.add #709

Merged
merged 1 commit into from
Mar 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
"big.js": "^5.0.3",
"bs58": "^4.0.1",
"cids": "~0.5.2",
"concat-stream": "^1.6.0",
"concat-stream": "^1.6.1",
"detect-node": "^2.0.3",
"flatmap": "0.0.3",
"glob": "^7.1.2",
"ipfs-block": "~0.6.1",
"ipfs-unixfs": "~0.1.14",
"ipld-dag-pb": "~0.13.0",
"ipld-dag-pb": "~0.13.1",
"is-ipfs": "^0.3.2",
"is-stream": "^1.1.0",
"lru-cache": "^4.1.1",
"lru-cache": "^4.1.2",
"multiaddr": "^3.0.2",
"multihashes": "~0.4.13",
"ndjson": "^1.5.0",
Expand All @@ -47,10 +47,10 @@
"peer-info": "~0.11.6",
"promisify-es6": "^1.0.3",
"pull-defer": "^0.2.2",
"pull-pushable": "^2.1.2",
"pull-pushable": "^2.2.0",
"pump": "^3.0.0",
"qs": "^6.5.1",
"readable-stream": "^2.3.4",
"readable-stream": "^2.3.5",
"stream-http": "^2.8.0",
"stream-to-pull-stream": "^1.7.2",
"streamifier": "^0.1.1",
Expand All @@ -65,17 +65,17 @@
"url": "https://github.com/ipfs/js-ipfs-api"
},
"devDependencies": {
"aegir": "^13.0.0",
"aegir": "^13.0.6",
"chai": "^4.1.2",
"cross-env": "^5.1.3",
"dirty-chai": "^2.0.1",
"eslint-plugin-react": "^7.6.1",
"eslint-plugin-react": "^7.7.0",
"go-ipfs-dep": "^0.4.13",
"gulp": "^3.9.1",
"hapi": "^17.2.0",
"interface-ipfs-core": "~0.51.0",
"hapi": "^17.2.2",
"interface-ipfs-core": "~0.55.1",
"ipfs": "~0.28.0",
"ipfsd-ctl": "~0.29.0",
"ipfsd-ctl": "~0.29.1",
"pre-commit": "^1.2.2",
"socket.io": "^2.0.4",
"socket.io-client": "^2.0.4",
Expand Down
5 changes: 3 additions & 2 deletions src/files/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ module.exports = (send) => {
const ok = Buffer.isBuffer(_files) ||
isStream.readable(_files) ||
Array.isArray(_files) ||
OtherBuffer.isBuffer(_files)
OtherBuffer.isBuffer(_files) ||
typeof _files === 'object'

if (!ok) {
return callback(new Error('"files" must be a buffer, readable stream, or array of objects'))
return callback(new Error('first arg must be a buffer, readable stream, an object or array of objects'))
}

const files = [].concat(_files)
Expand Down