Page 1 of 1

Downloads in a webview

Posted: Wed Apr 13, 2016 4:30 pm
by soapagent
On an iPad if I have a downloadable link in a webpage containing a csv file In the safari browser touching this link show it up in a viewer which displays (briefly) an 'Open in' button which allows me to open the file in Excel. When a similar link is displayed in a webview the viewer appears to come up but no 'Open in' option is displayed. Is it possible to get this behavior to work.

Re: Downloads in a webview

Posted: Thu Apr 14, 2016 9:52 am
by tsupartono
I don't think there is a way to get the "Open In..." button with imbedded web view.

If you have control over the HTML source, the best you can do is to open that CSV in Safari by invoking the OpenURL operation (once open in Safari you can use the "Open In..." functionality).
Let me know if you need more details with OpenURL operation.

Re: Downloads in a webview

Posted: Fri Apr 15, 2016 9:22 am
by soapagent
Hi,

I am currently building the csv on the fly and embedding it as a href within a webview containing a <table> of the same data. If I add a button to my form and on click perform a set_openurl on the csv url this will open the file up in Safari. Is this correct? If so it may be exactly what I need. I'll give it a go later this morning.

Re: Downloads in a webview

Posted: Fri Apr 15, 2016 10:23 am
by tsupartono
Yes that's correct.

Re: Downloads in a webview

Posted: Fri Apr 15, 2016 10:55 am
by soapagent
Works beautifully! Thanks!