0
PhoneGap을 사용하여 서버로 파일을 보내려고합니다. 여기에 다음 함수 매개 변수 파일 아래에 내 코드를 보내주십시오. 내가 로컬 호스트 서버로 가짜 URL을 삽입하면 그것은 나에게 서버 오류 코드 = 2를 보여주고, 내가 삽입 할 경우 실제 URL이 나를 찾을 수 없습니다 코드 파일이 표시되는 문제 = 1phonegap으로 서버에 파일 보내기
function gotFile(file)
{
navigator.notification.alert(file.fullPath);
var options = new FileUploadOptions();
options.mimeType="image/jpg";
options.fileKey="file";
var params = {};
params.IdPrestation = "3d660013-3028-46c3-adfa-d7141a712ed7";
params.IdPhoto = "3a660013-3028-46c3-adfa-d7141a712ed7";
options.params = params;
options.chunkedMode = true ;
var ft = new FileTransfer();
ft.upload(file.fullPath,encodeURI('http://Myserver.fr/Phototheque.asmx/SavePhoto'),function(r)
{
//navigator.notification.alert(r.response,function(){});
alert(r.response,function(){});
console.log("Code = " + r.responseCode);
console.log("Response = " + r.response);
console.log("Sent = " + r.bytesSent);
},
function(e)
{
//navigator.notification.alert('Serveur Erreur:' + e.code,function(){});
cause_erreur(e.code);
/*
alert('Serveur Erreur:' + e.code,function(){});
alert("upload error source " + e.source);
alert("upload error target " + e.target)
*/
},
options
);//ft.upload
}