2011-10-17 3 views
0

PhoneGap 응용 프로그램에서 Domino 서버로 파일을 게시해야합니다.Domino의 파일 업로드 제어

PhoneGap 파일 전송 예는 다음과 같습니다 // !! 변수 fileURI 내 장치의 텍스트 파일에 유효한 URI가 들어 가정

var win = function(r) { 
    console.log("Code = " + r.responseCode); 
    console.log("Response = " + r.response); 
    console.log("Sent = " + r.bytesSent); 
     } 

var fail = function(error) { 
    alert("An error has occurred: Code = " = error.code); 
} 

var options = new FileUploadOptions(); 
options.fileKey="file"; 
options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1); 
options.mimeType="text/plain"; 

var params = new Object(); 
params.value1 = "test"; 
params.value2 = "param"; 

options.params = params; 

var ft = new FileTransfer(); 
ft.upload(fileURI, "http://some.server.com/upload.php", win, fail, options); 
//This is a PHP example - Domino would be like 
// ft.upload(fileURI, "http://some.server.com/database.nsf/attachmentForm? createDocument", win, fail, options); 

사람이 게시되고있는 첨부 파일을 얻을 도미노에서 수행 될 필요가 무엇인지 알고 있나요?

답변

0

가장 쉬운 방법은 파일 업로드 컨트롤이 포함 된 양식을 Domino에 만드는 것입니다. 브라우저로 Domino 양식을 열고 일반적으로 사용되는 생성 된 HTML 양식을 볼 수 있어야합니다. 거기에 필요한 모든 정보를 찾을 수 있습니다. 물론 이것은 http multipart/form-data POST처럼 작동하는 ft.upload 메소드에 의존합니다.

관련 문제