Skip to main content
lovewebdev
Inspiring
August 17, 2006
Question

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

  • August 17, 2006
  • 2 replies
  • 324 views
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 has been closed for replies.

2 replies

Inspiring
August 18, 2006
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





lovewebdev
Inspiring
August 18, 2006
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.
Inspiring
August 18, 2006
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"))) %>
>