title: How to Write Files or Folder to IPFS via the HTTP API
body: <p>I'm confused about the HTTP API docs of IPFS。next is part of it。</p>
  <p>/api/v0/add
  Add a file or directory to IPFS.
  //but how to add a directory by golang? it look like so simple but no a example to finish it</p>
  <p>#cURL Example
  curl -X POST -F file=@myfile &quot;http://127.0.0.1:5001/api/v0/add?quiet=&amp;quieter=&amp;silent=&amp;progress=&amp;trickle=&amp;only-hash=&amp;wrap-with-directory=&amp;chunker=size-262144&amp;pin=true&amp;raw-leaves=&amp;nocopy=&amp;fscache=&amp;cid-version=&amp;hash=sha2-256&amp;inline=&amp;inline-limit=32&quot;</p>