I've just published (ftp'd) a test site to my new NT server. I had a library page set up where people could upload files to a specific directory and then view the library files in the directory. I keep getting the error that the directory does not exists or that Coldfusion does not recognize the directory. My code is attached below.<br><br>Upload_Openfile.cfm<br><br><!--- security check ---><br><CFIF Find( '..', URL.ServerFile )<br> or Find( '/', URL.ServerFile )<br> ><br> Error: You are not allowed to access this file<br> <CFABORT><br></CFIF><br><br><br><br><!--- parameters ---><br><CFSET LibraryDirectory = "../htdocs/Penndot/Upload"><br><CFSET FilePath = "#LibraryDirectory#/#URL.ServerFile#"><br><br><br><!--- extract the file extension ---><br><CFSET SeparatorPos = Find( '.', Reverse(URL.ServerFile) )><br><CFIF SeparatorPos is 0> <!--- separator not found ---><br> <CFSET FileExt = ''><br><CFELSE><br> <CFSET FileExt = Right( URL.ServerFile, SeparatorPos - 1 )><br></CFIF><br><br><br><!--- find the proper MIME type ---><br><CFIF FileExt is ''> <CFSET FileType = "unknown"><br><CFELSEIF FileExt is 'pdf'> <CFSET FileType = "application/pdf"><br><CFELSEIF FileExt is 'aif'> <CFSET FileType = "audio/aiff"><br><CFELSEIF FileExt is 'aiff'> <CFSET FileType = "audio/aiff"><br><CFELSEIF FileExt is 'art'> <CFSET FileType = "image/x-jg"><br><CFELSEIF FileExt is 'cil'> <CFSET FileType = "application/vnd.ms-artgalry"><br><CFELSEIF FileExt is 'gif'> <CFSET FileType = "image/gif"><br><CFELSEIF FileExt is 'htm'> <CFSET FileType = "text/html"><br><CFELSEIF FileExt is 'html'> <CFSET FileType = "text/html"><br><CFELSEIF FileExt is 'pdf'> <CFSET FileType = "application/pdf"><br><CFELSEIF FileExt is 'doc'> <CFSET FileType = "application/doc"><br><CFELSEIF FileExt is 'wpd'> <CFSET FileType = "application/wpd"><br><CFELSEIF FileExt is 'wk4'> <CFSET FileType = "application/wk4"><br><CFELSEIF FileExt is 'xls'> <CFSET FileType = "application/xls"><br><br><CFELSE> <CFSET FileType = "unknown"><br></CFIF><br><br><br><!--- return requested file ---><br><CFCONTENT TYPE="#FileType#" <br> FILE="#FilePath#"<br>><br><br>Upload_filelibrary.cfm<br><br><CFSET LibraryDirectory = "../htdocs/Penndot/Upload"><br><br><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FINAL//EN"><br><HTML><br><HEAD><br><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"><br><META NAME="Generator" CONTENT="NetObjects Fusion 4.0 for Windows"><br><TITLE>Libary of Files on Server</TITLE><br><br></HEAD><br><BODY BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#800080" TEXT="#000000" TOPMARGIN=2 LEFTMARGIN=2 MARGINWIDTH=2 MARGINHEIGHT=2><br><CFDIRECTORY<br> action="LIST"<br> directory="#LibraryDirectory#"<br> name="GetFiles"<br>><br>Misc. html coding to make it look pretty.<br><br>rest of cfml code for this page<br><br><CFSET Row = 1><br><CFOUTPUT query="GetFiles"><br><CFIF Type is "FILE"><br><TR bgcolor="#IIf(Row Mod 2, DE('ffffff'), DE('ffffcf'))#"><br> <TD width=300><br> Open File <A href="Upload_OpenFile.cfm/#Replace(Name,' ','','ALL')#?ServerFile=#URLEncodedFormat(Name)#">#Name#</A><br> </TD><br> <TD>#Size#</TD><br> <TD nowrap>#DateLastModified#</TD><br><br> <CFSET Row = Row + 1><br><br></TR><br></CFIF><br></CFOUTPUT><br><br><CFOUTPUT><br><br></TR><br></CFOUTPUT><br><br>Upload_fileactionform.cfm<br><br><!--- parameters ---><br><CFSET LibraryDirectory = "../htdocs/Penndot/Upload"><br><CFSET IsOverwriteEnabled = "YES"><br><br><br><br><!--- upload file with unique name ---><br><CFFILE<br> action="UPLOAD"<br> fileField="UploadedFile"<br> destination="#LibraryDirectory#/"<br> nameConflict="MAKEUNIQUE"<br>><br><br><br><!--- new name of the uploaded file ---><br><CFIF Form.ServerFile is ''><br> <CFSET NewServerFile = File.ClientFile><br><CFELSE><br> <CFSET NewServerFile = Form.ServerFile><br></CFIF><br><br><br><!--- check whether the new file name already exists in the directory ---><br><CFDIRECTORY<br> name="CheckFile"<br> action="LIST"<br> directory="#LibraryDirectory#/"<br> filter="#NewServerFile#"<br>><br><CFIF CheckFile.RecordCount is 0<br> or File.ClientFile is File.ServerFile><br> <CFSET FileAlreadyExists = "NO"><br><CFELSE><br> <CFSET FileAlreadyExists = "YES"><br></CFIF><br><br><cfif not isdefined("session.authenticated"
><br> <cfoutput><br> You are not authenticated, or your session has timed out<br> </cfoutput><br> <cfabort><br></cfif><br><br>pretty html stuff remainder of code follows:<br><br><!--- if file name already exists and overwrite is allowed delete file and throw an error ---><br><CFIF FileAlreadyExists and not IsOverwriteEnabled><br><br> <!--- delete file ---><br> <CFSET TempFilePath = "#LibraryDirectory#/#File.ServerFile#"><br> <CFFILE<br> action="DELETE"<br> file="#TempFilePath#"<br> ><br><br> <FONT size="+2" color="ff0000"><B>File Already Exists</B></FONT><br> <P><br> Press Back button and use different file name.<br><br><!--- ... else rename the file ---><br><CFELSE><br><br> <!--- rename file ---><br> <CFSET SourceName = LibraryDirectory & '/' & File.ServerFile><br> <CFSET DestinationName = LibraryDirectory & '/' & NewServerFile><br> <CFFILE<br> action="RENAME"<br> source="#SourceName#"<br> destination="#DestinationName#"<br> > <br> <P><br> File was successfully received.<br> <P><br> Click here to view a listing of the files in the <cfoutput>[<A href="Upload_FileLibrary.cfm?cfid=#cfid#&cftoken=#cftoken#" style="font-family: Arial, Helvetica, sans-serif; color: white;">Library</A>]</cfoutput><br></CFIF> <br><br>That's it, I can't figure out what's wrong since everything seems to be pointing to the right direction. Any help would be appreciated.<br>