Hi,

I have this problem which probably is not TG specific, but I'll try
anyway...

I am serving an image through TG like this:

    @turbogears.expose()
    def showimage(self):
        data = open('c:\\image.jpg', 'rb').read()
        cherrypy.response.headerMap["Content-Type"] = 'image/jpg'
        return data

This work, but i dont know why :P

But, it works in Firefox and IE if I use it in an <IMG> tag. If i open
the url in FF directly it shows as well. But if I open the url directly
in IE it asks me if I want to download it becuase of unknown content
typ (i think)

does anybody have any idea's on this?

thanx,

Guyon Morée
http://gumuz.looze.net

Reply via email to