Closed yytian1017 closed 4 years ago
No clue. Something worth trying is adding
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *">
to the index.html
see #16
Thank you sir for your response. On android, my ionic app has successfully uploaded img to a server but when running on ios, the reader.result is {}.
when I add , ios buid failed
Sorry. I have no idea what the problem is.
Can you try to listen for the load
instead of the loadend
event
reader.onload = () => {
Here a list of all supported events
https://developer.mozilla.org/en-US/docs/Web/API/FileReader
I really appreciate for your kind response. hmm..., I do nothing, but today it's work.
Hello, I'm trying to apply your example to my ionic project,
I console the reader.result, but it is {}. I don't the reason.