I'm using the Cordova Camera Plugin in an Ionic application. Everything works as expected on iOS. On Android, when the sourceType is set to CAMERA and destinationType is set to FILE_URI, it works as expected, returning a path like this: file:///storage/emulated/0/Android/data/com.myappname.myapp/cache/imageName.jpg
However, when the sourceType is set to PHOTOLIBRARY or SAVEDPHOTOALBUM and the destination type is set to FILE_URI, it returns a path with extra information (namely a query string) at the end of the file, making it impossible to load and use that file (ie. with CordovaFileTransfer). The path it returns is like this: file:///storage/emulated/0/Android/data/com.myappname.myapp/cache/image.jpg?12764830288374
The issue is the query string ?12764830288374 on the end. I understand this is done for caching issues in browsers, but why does Cordova Camera return the FILE_URI this way and what can be done to change it?
I realize I could simply strip off everything on the path after the question mark but that seems like a hacky solution. I'd like to know why it is returning the path this way and how to fix it properly.
Note: I have also tried returning it as a NATIVE_URI and the same issues holds true - it appends a question mark with a list of numbers to the end of the file path that prevents cordovaFileTransfer from properly uploading the file.