Commit a7ee771f authored by Romain Courteaud's avatar Romain Courteaud

dataURItoBlob: support empty data URI

parent ea932ba9
......@@ -150,6 +150,9 @@
// https://gist.github.com/davoclavo/4424731
function dataURItoBlob(dataURI) {
if (dataURI === 'data:') {
return new Blob();
}
// convert base64 to raw binary data held in a string
var byteString = atob(dataURI.split(',')[1]),
// separate out the mime component
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment