hi all,
I'm having this added code to have a little more controlled files download environment; however, error "File Not Found" window displayed when I try to download ZIP files while PDF files are a OK.
Here's the code
So, how can I fix this to download files as many file type as I can.
Thanks!
I'm having this added code to have a little more controlled files download environment; however, error "File Not Found" window displayed when I try to download ZIP files while PDF files are a OK.
Here's the code
Code:
Response.Buffer = True
Response.Clear
''set the directory that contains the files here
strFileName = Request.serverVariables("APPL_PHYSICAL_PATH") & "" & Request.QueryString("fname")
'response.contentType = "application/octet-stream"
response.addheader "content-disposition", "attachment; filename=" & request.QueryString("fname")
set stream = server.CreateObject("ADODB.Stream")
stream.type = adTypeBinary
stream.open
stream.LoadFromFile strFileName
while not stream.EOS
response.BinaryWrite Stream.Read(1024 * 64)
wend
stream.Close
Set stream = Nothing
response.Flush
response.End
So, how can I fix this to download files as many file type as I can.
Thanks!