From 989d71f489f55f77687fddc90e1b9266b0c99156 Mon Sep 17 00:00:00 2001 From: Moe Elsharif Date: Tue, 14 Nov 2017 10:37:04 +0100 Subject: [PATCH] feat: more options to ipfs.files.add --- src/files/add.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/files/add.js b/src/files/add.js index 324a49416..215a7be12 100644 --- a/src/files/add.js +++ b/src/files/add.js @@ -41,6 +41,12 @@ module.exports = (send) => { } else if (opts.hashAlg != null) { qs.hash = opts.hashAlg } + if (opts['only-hash'] != null) { + qs['only-hash'] = opts['only-hash'] + } + if (opts.pin != null) { + qs.pin = opts.pin + } const request = { path: 'add', files: files, qs: qs, progress: opts.progress }