Downloading files with ie on a mac

W

WizyDig

I'm having trouble getting a file to down load to the Mac running IE
with a file name we choose. We have tried all kinds of things including
changing the content type. The only thing that seems to work is to put
it in a link on a page and let them click the link. Any suggestions?


Wiz
 
R

Rimu Atkinson

have you tried
FileSize = FileLen(FileName)

Dim Buffer(FileSize) As Byte

Dim x As New System.IO.FileStream(FileName, IO.FileMode.Open)

x.Read(Buffer, 0, FileSize)

x.Close()

Response.ContentType = "application/pdf"

Response.AddHeader("content-disposition", "attachment; filename=" &
ProjectTitle & ".pdf")

Response.AddHeader("Content-Length", FileSize.ToString())

Response.BinaryWrite(Buffer)

Response.Flush()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top