Improve media-tag export in pad to work with existing CSP

This commit is contained in:
yflory
2017-10-23 10:55:40 +02:00
parent 3e4faf1be1
commit c1d05a00ba
3 changed files with 19 additions and 5 deletions

View File

@@ -207,6 +207,13 @@ define([], function () {
return Array.prototype.slice.call(A);
};
Util.blobToImage = function (blob, cb) {
var reader = new FileReader();
reader.onloadend = function() {
cb(reader.result);
};
reader.readAsDataURL(blob);
};
Util.blobURLToImage = function (url, cb) {
var xhr = new XMLHttpRequest();
xhr.onload = function() {