Skip to content

afeiship/next-arraybuffer2url

Repository files navigation

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.

About

Array buffer to blob url.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published