title: Upload a full directory to IPFS using ipfs (js-ipfs-http-client)
body: <p>I want to upload a directory to ipfs on my browser using (js-ipfs-http-client) module. </p>
  
  <p>I found this old issue. 
  <a href="https://github.com/ipfs/js-ipfs/issues/277" rel="nofollow noreferrer">https://github.com/ipfs/js-ipfs/issues/277</a>
  So I decided to use recursive  way to add files and get only one hash for it.</p>
  
  <pre><code>ipfs.addFromFs('path', { recursive: true, ignore: ['subfolder/to/ignore/**'] }, (err, result) =&gt; {
              if (err) { throw err }
              console.log(result)
          })
  </code></pre>
  
  <p>But it gave me this error. <a href="https://i.stack.imgur.com/Xa6nv.png" rel="nofollow noreferrer">fs Add doesn't work on browser</a></p>
  
  <p>I need to upload a directory to ipfs using javascript but all resources I had found upload only one file.Or a lot of files with array of hashes. I need a way to upload all files of directory and get the with only one hash. Thanks in advance.</p>