a form posts the document name to this:
<%
if request.form("file") <> "" then
response.redirect "download.asp?f=" & request.form("file") & ".pdf"
else
%>
which works fine. The script on download.asp looks like this:
<@ Language=VBScript %>
<%Response.buffer=True
filePath = "d:\http_root\member\public_html\ASTM\"
If request.cookies("name")("value") < 1 then
Response.redirect "login.asp"
End If
fileName = request.querystring("f")
Response.ContentType = "application/pdf"
Response.AddHeader "content-disposition","attachment; filename=" & fileName
Set FStream = Server.CreateObject("ADODB.Stream")
FStream.Open()
FStream.Type = 1
FStream.LoadFromFile(filePath&filename)
Response.BinaryWrite FStream.Read()
FStream.Close
Set FStream = Nothing
Response.End
'////////////////////////////////////////
%>
It has worked fine with other downloads... this is the first time I've specifically tried to grab a PDF with it...
I think I'm gonna go see a movie now... will worry about this next week. If anybody has ideas help is greatly appreciated.
B