cordova-plugin-filepath icon indicating copy to clipboard operation
cordova-plugin-filepath copied to clipboard

Error: column '_data' does not exist

Open marvin-SL opened this issue 5 years ago • 8 comments

Hello, I'm sharing file from other apps to my cordova app. When I share from explorer app, i've got the file uri such as : file:///sdcard/Audio/SoundRecorder/2019-03-04%2019-36-03.aac

but when I share from 3rd party app (whatsapp in my example), I don't receive a file uri : content://com.whatsapp.provider.media/item/100492 and then i got “column ‘_data’ does not exist”

    this.filePath.resolveNativePath(receivedFile).then((rslt) => {
          console.log('reslt');
        }).catch((error) => { console.log("error", error) }); //error column '_data' does not exist

ionic info

Ionic:

   ionic (Ionic CLI)  : 4.8.0
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.1.8

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 6.3.0, browser 5.0.3, ios 4.5.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 1.2.1

System:

   Android SDK Tools : 26.1.1 
   NodeJS            : v8.11.3 
   npm               : 5.6.0
   OS                : Linux 4.15


Can you help me ?

thanks

marvin-SL avatar Apr 30 '19 08:04 marvin-SL

I did a pull request to fix this https://github.com/hiddentao/cordova-plugin-filepath/pull/53

marvin-SL avatar May 24 '19 12:05 marvin-SL

@marvin-SL thanks a lot! I had to add <framework src="commons-io:commons-io:2.4" /> in the plugin.xml to make it work though.

mpadmaraj avatar Jun 01 '19 14:06 mpadmaraj

Thank you @mpadmaraj ! I will add it to the PR later this day

Edit:Added !

marvin-SL avatar Jun 04 '19 08:06 marvin-SL

@marvin-SL did you find any solution,can you please tell me I am also facing same situation,please reply

adityamaple1989 avatar Feb 19 '20 11:02 adityamaple1989

@marvin-SL did you find any solution,can you please tell me I am also facing same situation,please reply

Hello, yes here https://github.com/hiddentao/cordova-plugin-filepath/pull/53

marvin-SL avatar Feb 20 '20 21:02 marvin-SL

@marvin-SL Oh thank you so much for your reply, I am getting FileNotFoundException in below line context.getContentResolver().openInputStream(uri),I have already imported files,but I am getting the error

adityamaple1989 avatar Feb 24 '20 06:02 adityamaple1989

@marvin-SL ,I am also getting this error,When I shared the from one third party app to my ionic app,i.e Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference

adityamaple1989 avatar Feb 24 '20 06:02 adityamaple1989

When do we see a merge for the pr #53 ?

gaurav112 avatar Jul 12 '20 13:07 gaurav112