1.0.0 • Published 5 years ago
@jswork/next-arraybuffer2url
Licence
MIT
Version
1.0.0
Deps
0
Size
5 kB
Vulns
0
Weekly
0
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.