You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/07/16 10:37:33 UTC

[GitHub] [cordova-ios] anatolykazantsev commented on issue #883: No local file access

anatolykazantsev commented on issue #883:
URL: https://github.com/apache/cordova-ios/issues/883#issuecomment-659327316


   I'm very sorry and I guess I'm not the first one who is asking it, but I've being searching and going around all of these relates issue, cross links, etc, but could not see a solution.
   
   So my problem is accessing files on iOS (using cordova-ios 6.x) from cordova.file.cacheDirectory which is outside of the app bundle. Of course writing and reading via Cordova's File plugin works ok but the webview doesn't have direct access to it. And as I understood from all comments here and there, it is not possible in wkwebview. Neither setting schema/hostname (i.e. using WKURLSchemeHandler) nor using cordova-plugin-wkwebview-file-xhr.
   
   Sad news if it is true. For example taking a picture and showing its preview (via <img> tag) before uploading becomes very inconvenient on iOS and different to Android code. I believe there're plenty of Cordova-based apps using similar scenarios and it became "impossible" to do it stright-forward and we're also forced to use wkwebview.
   
   Alternatives are:
   
   - Internal web-server
   - data: (requires cleanup after usage)
   - Copying to cordova.file.tempDirectory (requires cleanup after usage)
   
   I wonder if I miss something and what's current good solution. Is there any plans to solve it somehow in future?
   
   If there's a better place to post this question/message, I'm happy to move it :-)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org