Open mc-sm opened 6 years ago
This issue may be related to #814.
Hi @mc-sm maybe too late, but I had exactly the same problem.
In this plugin, contrary to the cordova-plugin-email-composer
the file path must be complete, for example files: [cordova.file.dataDirectory + 'myimg.jpg']
. I like more the way the files path are dealt here, it's more clear and in accordance with the file paths of cordova-plugin-file
IMHO I think this issue may be closed because it's just a question of files path. Actually this plugin is better with that respect.
We’re using cordova-plugin-file to create a file in the app’s local filesystem. More specifically, the file is created in
/data/data/<app-id>/files/Documents
, which is in the Documents folder undercordova.file.dataDirectory
as per https://github.com/apache/cordova-plugin-file/blob/master/README.md#android-file-system-layout.When using cordova-plugin-email-composer, we’re able to successfully attach the file to an email by referencing it with
app://files/Documents/fileName.txt
.However, when using cordova-plugin-x-socialsharing, we are unable to successfully attach the file using
app://files/Documents/fileName.txt
and various other permutations of the path. The email client (Gmail) displays “Can’t attach empty file” or “Permission denied for the attachment”.Can anyone advise on the specific path that can be used to reach the file using cordova-plugin-x-socialsharing? Any suggestions or guidance is appreciated. Thanks!