how to get html link to open in safari

I have an html link in our Journey app to a file that can be downloaded, but I'd prefer that it just open in Safari (or whatever browser is default). Is there a setting we can tweak or a method we can use so that it opens rather than going to browser to download?

Yes, this is possible, please see this section in the doc:

return external.uri('');

that’s actually the code we currently have in place. The link is a web hosted PDF file, so the behavior we are seeing is that it goes immediately to download rather than “open” or display in browser.

The action that the browser needs to take when opening the link will be defined on the response returned from the server via the Content-Disposition header. The Content-Disposition header should be set to inline rather than attachment to be viewed in the browser. You can find more information on this topic here.

1 Like