@osimatic/helpers-js 1.0.67 → 1.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/file.js +10 -0
- package/package.json +1 -1
package/file.js
CHANGED
|
@@ -61,6 +61,16 @@ class File {
|
|
|
61
61
|
maximumFractionDigits: fractionDigits
|
|
62
62
|
}).format(size)) + ' ' + byteUnits[i];
|
|
63
63
|
}
|
|
64
|
+
|
|
65
|
+
static blobToBase64(blob, callback) {
|
|
66
|
+
let reader = new FileReader();
|
|
67
|
+
reader.onload = function() {
|
|
68
|
+
//let dataUrl = reader.result;
|
|
69
|
+
//let base64 = dataUrl.split(',')[1];
|
|
70
|
+
callback(reader.result);
|
|
71
|
+
};
|
|
72
|
+
reader.readAsDataURL(blob);
|
|
73
|
+
};
|
|
64
74
|
}
|
|
65
75
|
|
|
66
76
|
const CSV_FILE_EXTENSION = "csv";
|