Ask a Question related to ASP, Design and Development.
-
Andrew Durstewitz #1
Download file
Hi!
I am working on a peice of code that will allow a user to download a
file located in the users folder. The file is NOT located inside the
HTTP PUB so I need to use the FSO to stream it to them. For some reason
the code finds the file but the download fails...
ERROR: Internet Explorer cannot download downloadpdf.asp?code=OR1EC1
from mirror.***.com
Internet Explorer was not able to open this Internet site. The
requested site is either unavailable or cannot be found. Please try
again later.
CODE:
Set objFile = objFSO.GetFile(strFileName)
Response.Clear()
Response.AddHeader "Content-Disposition", "attachment; filename=" &
objFile.Name
Response.AddHeader "Content-Length", objFile.Size
Response.ContentType = "application/octet-stream"
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = 1
Response.CharSet = "UTF-8"
objStream.LoadFromFile(strFileName)
Response.BinaryWrite(objStream.Read)
objStream.Close
Set objStream = Nothing
Set objFile = Nothing
Thanks,
Andrew J Durstewitz
* * * Sent via DevBuilder [url]http://www.devbuilder.org[/url] * * *
Developer Resources for High End Developers.
Andrew Durstewitz Guest
-
File Download
Assuming I had some file(s) which i wanted posted on the web for other web viewers to download. How do i accomplish this. Can also reply at... -
ASP File download
Hello. I have a site developed. Throughout the site there are downloads littered throughout. They link to pdf's. What I need to do is create a... -
Download a file
Hello, I would like that a user can download a file starting from a server and that the user could place it where he wants. (sorry I'm a French guy... -
File Download?
Hello, a great problem for me is to download a file by other account than the logon user. I change the identity -> int usertoken; bool LoginOK... -
Bullschmidt #2
Re: Download file
Don't know if this would help any but I would think that this:
objStream.Type = 1
Should go before this:
objStream.Open
Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
[url]http://www.Bullschmidt.com[/url]
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Bullschmidt Guest
-
Marco #3
Download file
I uploaded a pdf file to my web site and created the link with a flash
button but when I try to open the pdf file from IE appear the following
messagge (I translated from the italian message):
Impossible download file "namefile.pdf " from web site "namewebsite".
Impossible to open the web site. Web site non available or not found
Anybody know what it means? Maybe I have made some kind of mistake bun I
cannot understand what.
Any kind of help will be very appricieted.
Regards
Marco
Marco Guest



Reply With Quote

