datasync-blob 1.1.13 → 1.1.14
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.
|
@@ -102,6 +102,7 @@ class DsBlob extends _react.Component {
|
|
|
102
102
|
//-----------------------------------------------------------------------------------------------------------------------------------------
|
|
103
103
|
readImageAsBase64 = async aPictureFile => {
|
|
104
104
|
let _reader = new FileReader();
|
|
105
|
+
alert("readImageAsBase64 !");
|
|
105
106
|
_reader.onload = this.storeImageToImg;
|
|
106
107
|
_reader.readAsDataURL(aPictureFile); //The readAsDataURL() method of the FileReader interface is used to read the contents of the specified file's data as a base64 encoded string.
|
|
107
108
|
};
|
|
@@ -109,6 +110,7 @@ class DsBlob extends _react.Component {
|
|
|
109
110
|
//-----------------------------------------------------------------------------------------------------------------------------------------
|
|
110
111
|
readImageAsBinary = async aPictureFile => {
|
|
111
112
|
let _reader = new FileReader();
|
|
113
|
+
alert("readImageAsBinary !");
|
|
112
114
|
_reader.onload = this.storeImageToImg;
|
|
113
115
|
_reader.readAsArrayBuffer(aPictureFile); //The readAsArrayBuffer() method reads the file as genuine binary content without base64 conversion.
|
|
114
116
|
};
|