@jswork/next-arraybuffer2url

1.0.0 • Public • Published

next-arraybuffer2url

Array buffer to blob url.

version license size download

installation

npm install -S @jswork/next-arraybuffer2url

usage

import '@jswork/next-arraybuffer2url';

const xhrOverride = new XMLHttpRequest();
xhrOverride.responseType = 'arraybuffer';
$.ajax({
  url: '/url/of/your/binary/data',
  method: 'GET',
  xhr: function() {
      return xhrOverride;
  }
}).then(function (responseData) {
  const url = nx.arraybuffer2url(responseData);

  // <img src={url} />
});

license

Code released under the MIT license.

Package Sidebar

Install

npm i @jswork/next-arraybuffer2url

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

4.89 kB

Total Files

5

Last publish

Collaborators

  • afeiship
  • yujiao.luo