[thelist] ColdFusion: reading user files

Raymond Camden jedimaster at macromedia.com
Thu Jun 21 07:10:21 CDT 2001


ColdFusion cannot read a file on the user's machine. If it could, this would
be a major security problem. In order to read the file you will need to do
one of two things:

1) Make the user upload the file first. (best solution)

2) Use special Java or JavaScript to read the file. This can only be done w/
signed scripts which is a real pain in the rear. (Or it was when I did it w/
Netscape and JavaScript a few years ago.)

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email   : jedimaster at macromedia.com
ICQ UIN : 3679482

"My ally is the Force, and a powerful ally it is." - Yoda

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]On Behalf Of jon steele
> Sent: Wednesday, June 20, 2001 10:09 PM
> To: thelist at lists.evolt.org
> Subject: [thelist] ColdFusion: reading user files
>
>
> Hi everyone,
>
> I've hit a little snag which should be (in my opinion) pretty
> staightforward.
>
> I have a CF app on a local server working great. It gets a user-defined
> file (using a <input type=file>) and reads the contents using a
> <CFFILE> tag. But when I upload the app to my remote server, it gives a
> coldfusion error "file not found, error in CFFILE tag". I think it's
> getting confused. It says the filepath correctly, but since it is a
> windows NT server, it tries to look for the files on the server. How
> can I fix this? I tried adding file:/// before the path in the <CFFILE>
> tag but it still doesn't work. Is this a security issue: not being able
> to read user files? Do I need to upload the file then read it?
>





More information about the thelist mailing list