Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<CFFILE ACTION="UPLOAD" .....>

Status
Not open for further replies.

Rachel80

Programmer
May 25, 2000
63
GB
I've no problem with uploading files into my local directory(drive C:). But what I need is to upload them onto the server, so that other workstation can view/access my shared files. I change the destination path to my server path but it fails... My server is 'FRUITS'.<br><br>&lt;cffile action=&quot;UPLOAD&quot; filefield=&quot;imagefile&quot; <br> destination=&quot;\\FRUITS\notice_uploads\#session.user#&quot;<br> nameconflict=&quot;MAKEUNIQUE&quot; <br> accept=&quot;image/jpg, image/pjpeg, image/gif,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image/bmp, image/tiff&quot;&gt;<br><br>The error I got was:<br><br>Error processing CFFILE<br><br>The directory specified in the DESTINATION attribute of the CFFILE tag (\\FRUITS\notice_uploads\mgr200\) is not valid. The directory either does not exist or is not accessible by the ColdFusion service.<br><br>How can I specify the server pathname so that I can upload files onto the server? or do I use &quot;http:// ....&quot;?<br>Please help, thanx alot!<br><br><br>
 
The destination has to be the physical path - d:\whatever\blah\blah
 
huh?? u mean i can't use server path?? but ColdFusion allows uploading to server rite? the Help Library does not have examples for uploading onto server...(only onto local drive)
 
can anybody tell me the syntax of coding the uploading of files onto the SERVER? <br>do i need any mapping of network drives to a shared directory to a server?<br>or is it just a normal upload statement?<br>(destination=&quot;c:\xxx\xxx\xx&quot;)<br><br>Thank you :)
 
Example: I am uploading an image from the user's computer to my server (live, not local server). Here is the code for the cffile tag: <b>&lt;CFFILE ACTION=&quot;UPLOAD&quot; FILEFIELD=&quot;FILE&quot; DESTINATION=&quot;d:\Inetpub\domains\apmoffice\stock\temp\#pic#&quot; NAMECONFLICT=&quot;OVERWRITE&quot;&gt;</b><br><br>In other words, you have to know the actual location of where you will be saving the file being uploaded. The server path won't work, thus the error you were getting.
 
Put<br><br>&lt;cfoutput&gt;#GetTemplatePath()#&lt;/cfoutput&gt;<br><br>in your template to get the actual server path if you don't have access to your server's directory...(Make sure you delete it before production, though..;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top