Can we make One webserver as Upload Server??
Posted: Fri Apr 03, 2009 8:02 pm
We do have around 10 web servers..Wanted to make one of them to them as webserver..
This is the code I am using and sServer is the uploadServer..But when I upload from other servers other than uploadserver it gives http error..
var PropUrl2 = "http://<%=sServer%>/CST.web/process.aspx"
var forwardUrl = "http://<%=sServer%>/Gen_Con/getuploadpreference.asp?cType=" + escape("<%=cType%>") + "&vonumber=" + escape("<%=COID%>") + "&genuserid=" + escape("<%=genuserid%>") + "&name=" + escape("<%=username%>") + "&emp_Name=" + escape("<%=emp_Name%>") + "&AllowUpload=" + escape("<%=AllowUpload%>") + "&idsub=" + escape("<%=idsub%>") +
"&usercompany=" + escape("<%=usercompany%>") + "&AccessGroup=" + escape("<%=AccessGroup%>") + "&arm=" + escape("<%=Arm%>") + "&projectid=" + escape("<%=projectid%>") + "&subfolder=" + escape("<%=subfolder%>") + "&AddendaID=" + escape("<%=AddendaID%>") + "&SubID=" + escape("<%=SubID%>") + "&projectvoid=" + escape("<%=ProjectVOID%>") + "&AddendaTitle=" +
escape("<%=AddendaTitle%>") + "&FileField=" + escape("<%=FileField%>") + "&TemplateID=" + escape("<%=TemplateID%>") + "&TemplateType=" + escape("<%=TemplateType%>") + "&ProjectTemplate=" + escape("<%=ProjectTemplate%>") + "&PreQualCOID=" + escape("<%=PreQualCOID%>") + "&GCEmailID=" + escape("<%=GCEmailID%>") + "&ProjectName=" + escape(ProjectName) + "&FolderID=" + escape("<%=FolderID%>") + "&Server=" + escape("<%=sServer%>")
var folderId = escape("<%=FolderID%>")+"/";
var whitelist = getExtension();
document.writeln(' classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="590" HEIGHT="300" NAME="fileupload" codebase="http://java.sun.com/update/1.4.2/jinsta ... on=1,4,0,0">');
document.writeln('<PARAM NAME=CODE VALUE="jfileupload.upload.client.MApplet.class">');
document.writeln('<PARAM NAME=CODEBASE VALUE="./">');
document.writeln('<PARAM NAME=ARCHIVE VALUE="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar,lib/batchui.jar">');
document.writeln('<PARAM NAME=NAME VALUE="fileupload">');
document.writeln('<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">');
document.writeln('<PARAM NAME="scriptable" VALUE="true">');
document.writeln('<PARAM NAME="url" VALUE="' + PropUrl2 + '">');
document.writeln('<PARAM NAME="paramfile" VALUE="uploadfile">');
document.writeln('<PARAM NAME="param1" VALUE="todo">');
document.writeln('<PARAM NAME="value1" VALUE="upload">');
document.writeln('<PARAM NAME="param2" VALUE="errorheader">');
document.writeln('<PARAM NAME="value2" VALUE="custommessage">');
//document.writeln('<PARAM NAME="param3" VALUE="relativefilename">');
document.writeln('<PARAM NAME="value3" VALUE="true">');
document.writeln('<PARAM NAME="folderdepth" VALUE="-1">');
document.writeln('<PARAM NAME="param4" VALUE="account">');
document.writeln('<PARAM NAME="value4" VALUE="'+folderId+'">');
document.writeln('<PARAM NAME="transferui" VALUE="jfileupload.transfer.client.edesign.BatchTransferUI">');
document.writeln('<PARAM NAME="transferuiresources" VALUE="i18n_pane">');
document.writeln('<PARAM NAME="resources" VALUE="i18n_bar">');
document.writeln('<PARAM NAME="mode" VALUE="ftp">');
document.writeln('<PARAM NAME="post" VALUE="' + forwardUrl + '">');
//document.writeln('<PARAM NAME="overwrite" VALUE="false">');
//document.writeln('<PARAM NAME="resume" VALUE="true">');
//document.writeln('<PARAM NAME="chunkmode" VALUE="onfly">');
//document.writeln('<PARAM NAME="chunksize" VALUE="2048000">');
document.writeln('<PARAM NAME="param5" VALUE="httpmethod">');
document.writeln('<PARAM NAME="value5" VALUE="put">');
document.writeln('<PARAM NAME="whitelist" VALUE="' + whitelist + '">');
This is the code I am using and sServer is the uploadServer..But when I upload from other servers other than uploadserver it gives http error..
var PropUrl2 = "http://<%=sServer%>/CST.web/process.aspx"
var forwardUrl = "http://<%=sServer%>/Gen_Con/getuploadpreference.asp?cType=" + escape("<%=cType%>") + "&vonumber=" + escape("<%=COID%>") + "&genuserid=" + escape("<%=genuserid%>") + "&name=" + escape("<%=username%>") + "&emp_Name=" + escape("<%=emp_Name%>") + "&AllowUpload=" + escape("<%=AllowUpload%>") + "&idsub=" + escape("<%=idsub%>") +
"&usercompany=" + escape("<%=usercompany%>") + "&AccessGroup=" + escape("<%=AccessGroup%>") + "&arm=" + escape("<%=Arm%>") + "&projectid=" + escape("<%=projectid%>") + "&subfolder=" + escape("<%=subfolder%>") + "&AddendaID=" + escape("<%=AddendaID%>") + "&SubID=" + escape("<%=SubID%>") + "&projectvoid=" + escape("<%=ProjectVOID%>") + "&AddendaTitle=" +
escape("<%=AddendaTitle%>") + "&FileField=" + escape("<%=FileField%>") + "&TemplateID=" + escape("<%=TemplateID%>") + "&TemplateType=" + escape("<%=TemplateType%>") + "&ProjectTemplate=" + escape("<%=ProjectTemplate%>") + "&PreQualCOID=" + escape("<%=PreQualCOID%>") + "&GCEmailID=" + escape("<%=GCEmailID%>") + "&ProjectName=" + escape(ProjectName) + "&FolderID=" + escape("<%=FolderID%>") + "&Server=" + escape("<%=sServer%>")
var folderId = escape("<%=FolderID%>")+"/";
var whitelist = getExtension();
document.writeln(' classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="590" HEIGHT="300" NAME="fileupload" codebase="http://java.sun.com/update/1.4.2/jinsta ... on=1,4,0,0">');
document.writeln('<PARAM NAME=CODE VALUE="jfileupload.upload.client.MApplet.class">');
document.writeln('<PARAM NAME=CODEBASE VALUE="./">');
document.writeln('<PARAM NAME=ARCHIVE VALUE="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar,lib/batchui.jar">');
document.writeln('<PARAM NAME=NAME VALUE="fileupload">');
document.writeln('<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">');
document.writeln('<PARAM NAME="scriptable" VALUE="true">');
document.writeln('<PARAM NAME="url" VALUE="' + PropUrl2 + '">');
document.writeln('<PARAM NAME="paramfile" VALUE="uploadfile">');
document.writeln('<PARAM NAME="param1" VALUE="todo">');
document.writeln('<PARAM NAME="value1" VALUE="upload">');
document.writeln('<PARAM NAME="param2" VALUE="errorheader">');
document.writeln('<PARAM NAME="value2" VALUE="custommessage">');
//document.writeln('<PARAM NAME="param3" VALUE="relativefilename">');
document.writeln('<PARAM NAME="value3" VALUE="true">');
document.writeln('<PARAM NAME="folderdepth" VALUE="-1">');
document.writeln('<PARAM NAME="param4" VALUE="account">');
document.writeln('<PARAM NAME="value4" VALUE="'+folderId+'">');
document.writeln('<PARAM NAME="transferui" VALUE="jfileupload.transfer.client.edesign.BatchTransferUI">');
document.writeln('<PARAM NAME="transferuiresources" VALUE="i18n_pane">');
document.writeln('<PARAM NAME="resources" VALUE="i18n_bar">');
document.writeln('<PARAM NAME="mode" VALUE="ftp">');
document.writeln('<PARAM NAME="post" VALUE="' + forwardUrl + '">');
//document.writeln('<PARAM NAME="overwrite" VALUE="false">');
//document.writeln('<PARAM NAME="resume" VALUE="true">');
//document.writeln('<PARAM NAME="chunkmode" VALUE="onfly">');
//document.writeln('<PARAM NAME="chunksize" VALUE="2048000">');
document.writeln('<PARAM NAME="param5" VALUE="httpmethod">');
document.writeln('<PARAM NAME="value5" VALUE="put">');
document.writeln('<PARAM NAME="whitelist" VALUE="' + whitelist + '">');