Spudhead
12-11-2002, 06:46 PM
Hi,
I'm using dundas upload (http://www.dundas.com) and getting a http 500 server error.
var upld = Server.CreateObject("Dundas.Upload.2");
//upld.MaxUploadSize=5000000;
upld.UseUniqueNames=false;
upld.UseVirtualDir=false;
var prTitle=escape(Request.Form("prTitle"));
var prFilepath=String(Request.Form("prFilepath"));
var prFilename="";
Response.Write(prTitle+"<br>"+prFilepath+"<br>");
if(prFilepath!=""){
var splitPath=prFilepath.split("\\");
prFilename=String(splitPath[splitPath.length-1]);
var serverPath=Server.MapPath("index.asp");
var splitServer=serverPath.split("\\");
var savePath="";
for(i=0;i<splitServer.length-1;i++){
savePath+=splitServer[i];
savePath+="\\";
}
savePath+="pres\\";
//savePath+=prFilename;
//upld.Save(savePath)
Response.Write(savePath);
}
I've tried going through and commenting out line by line. It's definitely getting as far as upld.Save(). As it is, it writes savePath fine; an ordinary looking path to the correct directory, starting "C:\" and ending "www\pres\".
It might be file permissions - but I, um, don't know how to set write permission via FTP in DOS. Anyone?
I'm using dundas upload (http://www.dundas.com) and getting a http 500 server error.
var upld = Server.CreateObject("Dundas.Upload.2");
//upld.MaxUploadSize=5000000;
upld.UseUniqueNames=false;
upld.UseVirtualDir=false;
var prTitle=escape(Request.Form("prTitle"));
var prFilepath=String(Request.Form("prFilepath"));
var prFilename="";
Response.Write(prTitle+"<br>"+prFilepath+"<br>");
if(prFilepath!=""){
var splitPath=prFilepath.split("\\");
prFilename=String(splitPath[splitPath.length-1]);
var serverPath=Server.MapPath("index.asp");
var splitServer=serverPath.split("\\");
var savePath="";
for(i=0;i<splitServer.length-1;i++){
savePath+=splitServer[i];
savePath+="\\";
}
savePath+="pres\\";
//savePath+=prFilename;
//upld.Save(savePath)
Response.Write(savePath);
}
I've tried going through and commenting out line by line. It's definitely getting as far as upld.Save(). As it is, it writes savePath fine; an ordinary looking path to the correct directory, starting "C:\" and ending "www\pres\".
It might be file permissions - but I, um, don't know how to set write permission via FTP in DOS. Anyone?