You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @maxweb4u, Basically it returns the image base64 with adding (line breaks i.e. \n) implicitly. So that it differs with the actual base64 and you thought it is returning wrong base64.
So, I have work arround and finds the solution to removes the line breaks from it.
e.g: let resizedImgBase64 = await ImgToBase64.getBase64String(resizedImg.uri) resizedImgBase64 = resizedImgBase64.replace(/\n/gi, "");
We are using replace method of javascript here for removing \n's from base64 string. We are replacing all the \n with empty character "".
Hope it works for you.
Thanks
Platform: android
RN: 0.60.4
ImgToBase64.getBase64String("file:///data/user/0/com.myapp/cache/1581517067881.JPEG")
return wrong base64 string.
The text was updated successfully, but these errors were encountered: