@jswork/next-arraybuffer2url
v1.0.0
Published
Array buffer to blob url.
Downloads
3
Maintainers
Readme
next-arraybuffer2url
Array buffer to blob url.
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.