Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 649 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 649 Bytes

next-base64-to-blob

Base64 to blob

installation

npm install -S afeiship/next-base64-to-blob --registry=https://registry.npm.taobao.org

usage

const b64 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAmAAAABpCAYAAACd....';

const blob = nx.base64ToBlob(b64);
const urlCreator = window.URL || window.webkitURL;
const imageEl = document.getElementById('image');

imageEl.src = urlCreator.createObjectURL(blob);

resources