<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
?2003 Cordys R&D B.V. All rights reserved.
The computer program(s) is the proprietary information of Cordys R&D B.V. and provided
under the relevant License Agreement containing restrictions on use and disclosure.
Use is subject to the License Agreement.
Project : Cordys WCP
File Name : uploadtoserver.htm
Description : uploads to server. In order to use this demo page the user needs a java call service
configured with the required java class exposed to the front end in the form of
a method called Upload which is implemented in the namespace http://schemas.cordys.com/1.0/devtools.
-->
<html><head>
<title>File Upload</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<script type="text/javascript" src="/cordys/wcp/application.js"></script>
<script type="text/javascript">
function uploadFile()
{
uploader.request = requestString.XMLDocument;
if ( !system.isIE )
{
if(document.getElementById("file1").value != "")
uploader.uploadFile(document.getElementById("uploadForm1"));
else
alert("Choose a file to upload");
}
else
{
if(document.getElementById("chosenFile").value != "")
uploader.uploadFile();
else
alert("Choose a file to upload");
}
}
function onLoad()
{
if ( !system.isIE )
{
document.getElementById("choose").style.display="none";
document.getElementById("choose1").style.display="none";
}
else
{
document.getElementById("file1").style.display="none";
}
}
function onUploadHandler()
{
if(window.application.event.status)
alert(cordys.getXML(window.application.event.response));
}
</script>
<script type="cordys/xml" id="requestString">
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<UpLoad xmlns="http://schemas.cordys.com/LVWSAppServerPackage" preserveSpace="no" qAccess="0" qValues="">
<leavingID />
<createName />
<createDate />
<fileName>Upload:FileName1</fileName>
<fileContent>Upload:FileContent1</fileContent>
<comment>PARAMETER</comment>
</UpLoad>
</SOAP:Body>
</SOAP:Envelope>
</script>
</head>
<body onLoad=onLoad()>
<div cordysType="wcp.library.util.Upload" id="uploader" encode="true" style="display:none" onupload="onUploadHandler()" xmlcontent="true"></div>
<center><h4>File Decode Demo</h4></center>
<center>
Select a file to upload:
<input id ="choose1" type=text name="chosenFile"><input type=button value="Choose File" id="choose" οnclick="chosenFile.value = uploader.browse(1)">
<form action="com.lv.lvattachment.upLoad.wcp" id="uploadForm1" name="uploadForm1" enctype="multipart/form-data" method="post">
<INPUT type="file" id="file1" name="file1" />
</form>
</center><br>
<center>
<input type="button" value="Upload" name="Upload" onClick="uploadFile()"></input>
</center>
</body>
</html>
利用Cordys插件 上传文件到 Cordys服务器目录
最新推荐文章于 2018-11-09 14:26:04 发布