[thelist] Streaming a Binary as image src

Anthony Baratta Anthony at Baratta.com
Thu Mar 15 18:18:26 CST 2001


Howdy....

I want to stream an image "within" the HTML, not as the sole content of the 
page.

Here's an example....

HiddenImage.html

<html>
<body>
<img src="./showimage.asp" width="141" height="142">
</body>
</html>


ShowImage.asp

<%
     ImageDir = "Drive:\Dir\SubDir\"
     ImageName = "Image.gif"

     Set oFM = CreateObject("SoftArtisans.FileManager")
     Set oBS = oFM.OpenBinaryFile(ImageDir & ImageName)
     Response.ContentType = "image/GIF"
     Response.Addheader "Content-Disposition", "inline; filename=" & ImageName
     Response.BinaryWrite oBS.ReadAll

     'Clean up....
     Set oBS = Nothing
     Set oFM = Nothing
     Response.End
%>

I think this was discussed here, but I can't find anything in the archives. 
I'm I off base in this approach?
----
Anthony Baratta
President
Keyboard Jockeys





More information about the thelist mailing list