0

I want the user to upload files to server.

In the destination path of cffile I am giving it as \servername\folder\filename.

However, it doesn't recognize this path. Any suggestions?

James A Mohler
  • 11,060
  • 15
  • 46
  • 72
Aniruddha
  • 3,157
  • 4
  • 32
  • 48
  • What account is the ColdFusion service running under? That account needs to have write access to your file destination. – ale Feb 01 '12 at 02:21
  • What operating system are you running? Are you able to use cffile to create files? Try that first before debugging uploads – Mike Causer Feb 01 '12 at 13:20
  • I am on Windows XP. The server I am trying to upload to is in the network. I can access the server folders directly if I give a path directly through Windows explorer, however cffile gives me invalid destination error... – Aniruddha Feb 01 '12 at 20:20

1 Answers1

1

don't you need two leading slashes for a UNC path? \\servername\path\to\file\

in your example you only have; \servername.....

Otherwise, as other have suggested it might be a permissions error. I have only just been using CFFILE yesterday and today, using a UNC path to the server.

Also, what OS is the server, there are some oddities sometimes when trying to attach to a MS-Server. Eg. If you;re using a fully qualified domain name for SERVERNAME, try just the computer name. Or vice-versa...

Gavin Baumanis
  • 343
  • 1
  • 11