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

Commit 989d71f

Browse files
Moejoe90daviddias
authored andcommitted
feat: more options to ipfs.files.add
1 parent dffc9e7 commit 989d71f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/files/add.js

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ module.exports = (send) => {
4141
} else if (opts.hashAlg != null) {
4242
qs.hash = opts.hashAlg
4343
}
44+
if (opts['only-hash'] != null) {
45+
qs['only-hash'] = opts['only-hash']
46+
}
47+
if (opts.pin != null) {
48+
qs.pin = opts.pin
49+
}
4450

4551
const request = { path: 'add', files: files, qs: qs, progress: opts.progress }
4652

0 commit comments

Comments
 (0)