我有一个应用程序,允许用户拍照并将其上传到服务器 . 它在iOS中运行良好,但在Android上,文件的路径在Filetransfer中抛出错误代码1

navigator.device.capture.captureImage(captureSuccess, captureError, {
            destinationType: navigator.camera.DestinationType.FILE_URI,
            quality: 80,
            sourceType: sourceType,
            saveToPhotoAlbum: true,
            correctOrientation: true
        });

...

function captureSuccess(mediaFile) {
        console.log("processCapture");
        console.log(JSON.stringify(mediaFile));
        var media_path = mediaFile.fullPath;

...

ft.upload(media_path, encodeURI(site_url+"/api/uploadMedia"), uploadSuccess, uploadFail, options);

调试Phonegap看起来很好看我希望其他人遇到这个问题 . 它可能是我正在使用的插件的版本,在config.xml或Content-Security-Policy中的访问 . 或者其他一些事情 . 我试过从对象中使用fullPath和localPath . 同样的错误 .

<meta http-equiv="Content-Security-Policy" content="default-src * data: gap: 'unsafe-inline' https://ssl.gstatic.com; style-src 'self' 'unsafe-inline' 'unsafe-eval'; media-src *" />

...

<preference name="DisallowOverscroll" value="true" />
<preference name="fullscreen" value="false"/>
<preference name="android-minSdkVersion" value="21" />
<preference name="deployment-target" value="9.0" />
<preference name="orientation" value="portrait" />
<preference name="phonegap-version" value="cli-7.0.1" />
<preference name="android-build-tool" value="gradle" />
<preference name="StatusBarOverlaysWebView" value="false" />
<plugin name="cordova-plugin-battery-status" source="npm" spec="~1.1.1" />
<plugin name="cordova-plugin-camera" source="npm" spec="~2.4.1" />
<plugin name="cordova-plugin-media-capture" source="npm" spec="~1.4.3" />
<plugin name="cordova-plugin-console" source="npm" spec="~1.0.2" />
<plugin name="cordova-plugin-contacts" source="npm" spec="~2.0.1" />
<plugin name="cordova-plugin-device" source="npm" spec="~1.1.1" />
<plugin name="cordova-plugin-device-motion" source="npm" spec="~1.2.0" />
<plugin name="cordova-plugin-device-orientation" source="npm" spec="~1.0.2" />
<plugin name="cordova-plugin-dialogs" source="npm" spec="~1.2.0" />
<plugin name="cordova-plugin-file" source="npm" spec="~4.1.1" />
<plugin name="cordova-plugin-file-transfer" source="npm" spec="~1.5.0" />
<plugin name="cordova-plugin-geolocation" source="npm" spec="~2.1.0" />
<plugin name="cordova-plugin-globalization" source="npm" spec="~1.0.3" />
<plugin name="cordova-plugin-inappbrowser" source="npm" spec="~1.3.0" />
<plugin name="cordova-plugin-media" source="npm" spec="~2.2.0" />
<plugin name="cordova-plugin-network-information" source="npm" spec="~1.2.0" />
<plugin name="cordova-plugin-splashscreen" source="npm" spec="~3.2.1" />
<plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.2" />
<plugin name="cordova-plugin-vibration" source="npm" spec="~2.1.0" />
<plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1" />

...

<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
    <allow-intent href="market:*" />
</platform>
<platform name="ios">
    <allow-intent href="itms:*" />
    <allow-intent href="itms-apps:*" />
</platform>

任何有关尝试的事情的帮助将不胜感激 . 如果您在科尔多瓦尝试过任何事情,我可能会知道,我会四处乱转 .

我遇到的最后3个问题是由于更新了某些内容并打破了其他插件 .

谢谢,杰米