Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): make readFile don't return newlines on base64 strings #2857

Merged
merged 1 commit into from
May 1, 2020

Conversation

rosmcmahon
Copy link
Contributor

On Android, the default action of Filesystem.readFile creates a malformed base64 string with newlines added.

This is acceptable in the browser when displaying images, for example, but not when base64 data is expected.

ref [https://developer.android.com/reference/android/util/Base64#NO_WRAP]

Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, we use NO_WRAP on camera plugin and when writing, thanks!

@jcesarmobile jcesarmobile changed the title fix(android) readFileAsBase64EncodedData adds newlines fix(android): make readFile don't return newlines on base64 strings May 1, 2020
@jcesarmobile jcesarmobile merged commit 31d65c9 into ionic-team:master May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants