In a Xojo Webapp you can not just provide files for download, you can also put them on links:
myLink is a WebLink object on the web page. File is a WebLink property defined in the webpage.
dim p as Picture = LogoMBS(500)
dim w as new WebPicture(p)
w.Filename = "image.png"
file = w
myLink.Target = myLink.kTargetNewWindow
myLink.URL = w.URL
The link now opens in a new browser window or a new tab. For a PDF or image file, this will show it directly in the browser and not start a new download.