在Domino中的文件上传控制 [英] File Upload Control in Domino

查看:138
本文介绍了在Domino中的文件上传控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过PhoneGap应用程序将文件发布到Domino服务器。

I need to post a file to Domino Server from a PhoneGap Application.

这里是PhoneGap文件传输示例
//!假设变量fileURI包含设备上文本文件的有效URI

Here is the PhoneGap File Transfer example // !! Assumes variable fileURI contains a valid URI to a text file on the device

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);

有没有人知道在Domino中需要做什么来获取正在发布的文件附件? / p>

Does anyone know what needs to be done in Domino to get the file attachment that is being posted?

推荐答案

最简单的做法是在Domino中创建一个包含文件上传控件的表单。您应该能够使用浏览器打开Domino表单,并查看通常使用的生成的html表单。在那里你会发现所有你需要的信息。这当然取决于ft.upload方法像http multipart / form-data POST。

The easiest thing to do would be to create a form in Domino containing a File Upload control. You should be able to open the Domino form with a browser and see the generated html form that would normally be used. In there you will find all the info you need. This is of course dependent on the ft.upload method acting like an http multipart/form-data POST.

这篇关于在Domino中的文件上传控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆