Re: ASP download for PDF files not working
Hi Jeff
Sorry for the delay in coming back to you.
Basically I know it isn't reading the file in properly, because when the
download is trying to initiate I can see that it doesn't know what the
filename is and therefore says that it can't find the path.
It can't be a fault of the code, because the exact same code works if the
file is smaller.
Rgds
Laphan
Jeff Cochran <jeff.nospam@zina.com> wrote in message
news:4101300a.190786686@msnews.microsoft.com...
On Fri, 23 Jul 2004 11:49:56 +0100, "Astra" <info@NoEmail.com> wrote:
[color=blue]
>Hi All
>
>The following ASP routine allows me to force a PDF file to download rather
>than show up in IE:
>
>Response.ContentType = "application/asp-unknown" ' arbitrary
>
>Response.AddHeader "content-disposition","attachment; filename=" & theFile
>
>Set adoStream = Server.CreateObject("ADODB.Stream")
>
>adoStream.Open()
>
>adoStream.Type = 1
>
>adoStream.LoadFromFile(thePath)
>
>Response.BinaryWrite adoStream.Read()
>
>adoStream.Close
>
>Set adoStream = Nothing
>
>Response.End
>
>This works fine for 250KB - 500KB PDF files, but I've just uploaded a 6MB
>file and it simply doesn't seem to do anything. The code does nothing which
>in turn means that the standard Save dialogue box can't find the file.
>
>Any ideas on what I can do?[/color]
How do you know it does nothing?
Jeff |