-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Good first issueInterested in collaborating? Take a stab at fixing one of these issues.Interested in collaborating? Take a stab at fixing one of these issues.Help Wanted
Issues ideal for external contributors.Issues ideal for external contributors.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.

Description
Description
I launched "react-native run-android" on MAC 10.11.6 (15G1004). I found when I use ImageEditor.cropImage(uri) to crop an image, the base64 text of image is not as my expected. Base64 text of image should be a whole string. But I found there is a linefeed after each 76 characters. When I put it as a JOSN object value, and stringify the JSON object. Then I try to parse this JSON object. I will meet a error: Unexpected Token. If I use base64Text.replace("\n", "").replace("\r",""), then It's ok;
for example:
ImageStore.getBase64ForTag(url, (base64Data) => {
let sImageBase64Data = "data:image/jpg;base64," + base64Data.replace(/\n|\r/g, "");
}
Solution
Replace all linefeed and carriage-return by base64Data.replace(/\n|\r/g, "").
Additional Information
- React Native version: 0.29
- Platform: Android
- Operating System: MacOS
Metadata
Metadata
Assignees
Labels
Good first issueInterested in collaborating? Take a stab at fixing one of these issues.Interested in collaborating? Take a stab at fixing one of these issues.Help Wanted
Issues ideal for external contributors.Issues ideal for external contributors.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
