MediaProxy upload

This commit is contained in:
Cássio Zen
2016-07-19 18:56:54 -03:00
parent 39c575b52d
commit 483fdb2643
3 changed files with 10 additions and 7 deletions

View File

@ -20,7 +20,8 @@ MediaProxy.prototype.toBase64 = function() {
const fr = new FileReader();
fr.onload = (readerEvt) => {
const binaryString = readerEvt.target.result;
resolve(btoa(binaryString));
resolve(binaryString.split('base64,')[1]);
};
fr.readAsDataURL(this.file);
});