How to use the ipfs-http-client.Buffer function in ipfs-http-client

To help you get started, we’ve selected a few ipfs-http-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github embark-framework / embark / packages / embarkjs / ipfs / src / index.js View on Github external
reader.onloadend = function () {
      const buffer = IpfsHttpClient.Buffer.from(reader.result);
      self._ipfsConnection.add(buffer, function (err, result) {
        if (err) {
          return reject(err);
        }

        resolve(result[0].path);
      });
    };
    reader.readAsArrayBuffer(file);

ipfs-http-client

A client library for the IPFS HTTP API

Apache-2.0 OR MIT
Latest version published 22 days ago

Package Health Score

95 / 100
Full package analysis