Good point Shawn. I suppose as long as you have the proper security in
the first place, it isn't much of an issue.
shawn gorrell wrote:
Mike,
There are usage scenarios when you might want to serve content from
outside of the webroot. For example, let's say you have an application
that serves PDF files, but you want to ensure that only authenticated
users can get at the file. If you put it in a /pdf directory under the
webroot and then provide a link to it directly, then someone can copy
that link and send to another user who can get it without authentication
(assuming you aren't using integrated authentication). For times like
that, I'll put a directory outside of the webroot and have CF present it
via CFCONTENT (file.cfm?fn=mypdf.pdf). That makes CF the intermediary so
that you can ensure only authenticated users get it.
----- Original Message ----
From: Mike Staver <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, April 24, 2008 4:18:46 PM
Subject: Re: [ACFUG Discuss] How Load Files from Outside the Web Directory?
In windows land, you access network shares like so:
\\servername\sharename
Or in dos with the \'s as well, like "cd C:\"
I can't remember what CF will do that off the top of my head. Working
with file systems in linux, it's a forward slash. Web URL's are also
forward slashes. So, I would think if I was on a windows box working with
the file system, such as with cffile, I would use the native OS
preference. If I was doing something with cflocation or cfcontent, I
would use forward slashes since it will be displayed through a web
browser.
I think as others have said though, you can serve up content from outside
the wwwroot directory - but it's my personal preference not to just based
on a security stand point. I get a warm fuzzy feeling knowing that any
content being served up is coming from inside the web directory and
nowhere else, but it's a personal preference.
> Thanks Mike, I'll try that next time I'm at the client's place of
> business, after making sure I can get it working localhost. I do have a
> question about it though: I'm never clear when to use forward slashes vs.
> backslashes, but I do know that in writing web apps I've had much better
> luck with forward slashes. So by \\servername\sharename did you mean
> //servername/sharename?
-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------
-------------------------------------------------------------
Annual Sponsor - Figleaf Software <http://www.figleaf.com>
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink <http://www.fusionlink.com>
-------------------------------------------------------------
--
-Mike Staver
[EMAIL PROTECTED]
-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------