Skip to main content
lovewebdev
Inspiring
Aug 17, 2006 10:07 PM UTC
Question

Send a file that resides above the virtual directory to the browser using ASP.

How do you send a file that resides above the virtual directory to the browser using ASP.

this doesn't work:
<% Response.Redirect(Server.Mappath("..\..\..\files\" & rsgetefile("filename"))) %>
This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Inspiring
Aug 18, 2006 10:33 AM UTC
Have a look for Tom Muck's Force Download extension. It'll stream in a file
from outside the root.

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004





Translate
lovewebdev
Inspiring
Aug 18, 2006 5:44 PM UTC
Thanks. I found working code. It's now streaming the file to the browser from the directory above the virtual directory. I need that to secure the files.

I'l still check out that extension.
Translate
Inspiring
Aug 18, 2006 12:15 AM UTC
Basically you can't send a person to the location as that would totally
defeat the purpose of placing files above the virtual root. You can stream a
file from a page on the site if you use the physical location on the server
to call it.

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"lovewebdev" <webforumsuser@macromedia.com> wrote in message
news:ec2paf$9ht$1@forums.macromedia.com...
> How do you send a file that resides above the virtual directory to the
> browser using ASP.
>
> this doesn't work:
> <% Response.Redirect(Server.Mappath("..\..\..\files\" &
> rsgetefile("filename"))) %>
>


Translate