Why do you now bring in "the .cfm file that does the pop-up; where the error occurs"? Weren't we talking instead about the CFM file that does the upload, where the error occurs? Insert the test code in the file that does the upload. (I would temporarily comment out the upload code first). |
My apologies... the pop-up and the upload are the same file. So, I did as you said and the current directory and the directory that is supposedly invalid are identical. Sorry for the confusion.
I have reviewed this thread. It is now clear to me why Coldfusion is unable to find the destination directory.
When you began the thread, the value of the destination directory (newDest) was
\\TestServer\secure\Authorization\378Docs\
and the action page for the upload form was
\\TestServer\secure\Authorization\upload378Act.cfm
Destination directory and upload form appeared to have the same root directory, namely, \\TestServer\secure\Authorization\. However, in the most recent error-message, the value of the destination is
\\wedt-Dev\secure\Authorization\378Docs\
whereas the upload form's action page (which you have blanked out) is at
\\W...\...\...\WEDT\secure\Authorization\upload378Act.cfm
The respective root directories are different. This suggests that the paths \\wedt-Dev\secure\Authorization\ and \W...\...\...\WEDT\secure\Authorization\ belong to 2 different environments, possibly development and production. In fact, the latest error message suggests you're attempting to get the production code (in \WEDT\secure\Authorization\) to upload files to a destination on the development server (in \WEDT-DEV\secure\Authorization\).
Now, on to a possible solution. Use the following dynamic, server-independent definition of your destination directory
<cfset newDest = getDirectoryFromPath(expandpath('*.*')) & "378Docs\">
Place the line just before the cffile upload tag. It will resolve to
\\wedt-Dev\secure\Authorization\378Docs\
or to
\\W...\...\...\WEDT\secure\Authorization\378Docs\
depending on which server you are on.