I've figured it out, for those ever interested, you need to do this.
Response.AddHea der "Content-Disposition", "inline; filename=anyfil ename.wav"
key is in the "inline" not "attachment ", If you want to force a "save as"
box, you just have to use attachment. You'll also need to set up the
ContentType, as so
strFileType = lcase(Right(str FileName, 4))
Select Case strFileType
Case ".asf"
ContentType = "video/x-ms-asf"
Case ".avi"
ContentType = "video/avi"
Case ".doc"
ContentType = "applicatio n/msword"
Case ".zip"
ContentType = "applicatio n/zip"
Case ".xls"
ContentType = "applicatio n/vnd.ms-excel"
Case ".gif"
ContentType = "image/gif"
Case ".jpg", "jpeg"
ContentType = "image/jpeg"
Case ".wav"
ContentType = "audio/wav"
Case ".mp3"
ContentType = "audio/mpeg3"
Case ".mpg", "mpeg"
ContentType = "video/mpeg"
Case ".pdf"
ContentType = "applicatio n/pdf"
Case ".rtf"
ContentType = "applicatio n/rtf"
Case ".htm", "html"
ContentType = "text/html"
Case ".asp"
ContentType = "text/asp"
Case Else
'Handle All Other Files
ContentType = "applicatio n/octet-stream"
End Select
Response.Conten tType = ContentType
"Michael" <raterus@localh ost> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
Hello,
I'm looking for a way to allow a client who clicks on a link the ability
to "adodb.stre am" a multimedia file (mainly audio/wav) files, but the file
they would be accessing is outside the wwwroot (for security / traceability).
I don't want the "save as" box to open for streamable content. Basically
I'm trying to mimic the exact action, as if they had clicked a
www.mydomain.com/download.wav file, and allow the browser to open it up
automatically and save it if needed.
Here is the code I'm currently using to stream the audio file to the
client.
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadF romFile "c:\outside_my_ wwwroot\test.wa v"
Response.Conten tType = "audio/wav"
Response.Binary Write objStream.Read( )
objStream.Close
I'm sure it can be done, I really just probably need the appropriate
headers to tag to page (I'm using the adodb.stream object ).
Can anyone help me out with this?
Thanks!
--Michael