shareMsg and shareTitle are varibles, it seems a file is actually sharing but instead of actually attaching the file referenced to by [source] it’s creating a new file with the contents of the file being the text of shareMsg
I havnt specified a version so it just grabs the latest version. I suspect it’s either cordova-plugin-x-socialsharing-android12 or cordova-plugin-file.
I do an sqlExport to a local file which i save to the TEMPORARY file location, then i get that file to share using cordova-plugin-x-socialsharing-android12.
I also do a similar method for a local PDF file which also throws the same error,
“If set to true loading file:/// URLs is allowed. Note: Enabling this setting allows malicious scripts loaded in a file:/// context to launch cross-site scripting attacks, either accessing arbitrary local files including WebView cookies, app private data or even credentials used on arbitrary web sites.”
I will try it again but only with <preference name="hostname" value="localhost" /> to see if that makes any difference.
Been awhile since I used the file plugin but I may have to circle back as I start allowing profile photo uploads in a new app. When I read the bug report on github it looked like there was an option using cdvfile:// that was safer. I’ll have to look later this weekend.
ok great, let me know how you get on. As this app is an urgent bug fix I may have to use AndroidInsecureFileModeEnabled untill another method is found.