-
Notifications
You must be signed in to change notification settings - Fork 136
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(image-loader): use tempDirectory on iOS #39
Conversation
The tempDirectory can be accessed from the WKWebView as well; no need for base64!
According to the File plugin documentation, the tempDirectory is meant for temporary files that might not persist across app restarts. I haven't played around with the What if we add an option to customize the iOS behavior, to make sure everybody is happy. Available options can be:
Not sure how the new Ionic WKWebView fork updates work, but I think they serve files via And I think the Base64 option will be helpful to develop with |
In my experience the I will implement the option next week! |
Thanks @swiftyone |
This reverts commit bea5839.
If 'uri' is used the files will be copied to the temporary directory if the WKWebView engine is used. Files in this directory are not persistent, but accessible from within the WebView. If the files do not exist any longer they will automatically be copied again!
Alright, have a look at it! Also I did use readAsDataURL for the base64 option to avoid directly using the FileReader, which can lead to some problems (#31). I did not(!) include the 'disable' option, as I was not completely sure, if this is really necessary; I don't really see the benefit of it. |
Looks good, thanks @swiftyone ! |
The tempDirectory can be accessed from the WKWebView as well; no need
for base64!