Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/462.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何使用另一个输入表单创建android cordova图像上传_Javascript_Php_Mysql_Cordova_Html Framework 7 - Fatal编程技术网

Javascript 如何使用另一个输入表单创建android cordova图像上传

Javascript 如何使用另一个输入表单创建android cordova图像上传,javascript,php,mysql,cordova,html-framework-7,Javascript,Php,Mysql,Cordova,Html Framework 7,我正在使用Cordova和framework7设置一个新的应用程序,我想创建一个包含photo/image from camera的表单,并输入表单作为说明和名称文件 我已经成功地调用摄像头功能从android手机上拍照,但我需要将手机上的图像临时位置发送到输入值并提交表单 那么,当我单击“提交”按钮时,从哪里开始提交包含图像数据、名称和描述的表单呢 navigator.camera.getPicture(cameraSuccess, cameraError); // success func

我正在使用
Cordova
framework7
设置一个新的应用程序,我想创建一个包含
photo/image from camera
的表单,并输入表单作为说明和
名称文件

我已经成功地调用摄像头功能从android手机上拍照,但我需要将手机上的图像临时位置发送到输入值并提交表单

那么,当我单击“提交”按钮时,从哪里开始提交包含图像数据、名称和描述的表单呢

navigator.camera.getPicture(cameraSuccess, cameraError);

// success
function cameraSuccess(file_uri) {
  window.resolveLocalFileSystemURL(file_uri,
    function(fileEntry) {
        // fileEntry will have file name and file native URL
    });
}

// error
function cameraError(imageData) {
  // on error
}
确保摄像头
destinationType
设置为
FILE\u URI