Viewing stored images
Hi Guys,
In my Zen page I've a grid with a list of uploaded images and it's working fine when running from the Server where the application resides where I can just click to an image and my code displays the image in a second screen (MSDS.Image.StreamServer.cls) ,
.png)
.png)
but the problem if running the page from a client machine (internet), I get this annoying extra steps with the file downloaded as .cls then I'll have to click open and choose a program ..etc which is inconvenient for user so how can I fix this?
.png)
here is the call to view the image
<column linkCaption="View" header="ImageLink" link="MSDS.Image.StreamServer.cls?ATTID=#(%query.ID)#&FILENAME=#(%query.FileName)#'"
Thanks
Comments
Make sure, that your class responses with correct HTTP header ContentType, so, browser will understand that it's an image, and if the content type is supported it will be shown, as well as ContentDisposition
for instance
Content-Type: image/jpeg
Content-Disposition: inline; filename="filename.jpg"PNG, and other files, should have their own content types too