iOS WKWebView Handle File Download
Asked Answered
M

0

6

I am facing the following problem:

In a web interface, file downloads are triggered with an anchor tag, like this:

<a href="/bla/blabla" download>..</a>

While Safari browser can handle this request and open a dialogue to handle the file, WKWebView treats this just as an ordinary link and does nothing with it. I want to be able to get the file handler dialogue that is normally there when using Safari.

Right now there are 2 problems and I do not see an opening there yet:

  1. I can not detect a click on the element as it is treated just as a normal link. And I can not rely on the URL parameters to detect if it is a file since that is not constantly true.
  2. Even if the URL is defined as a one leading to a file, I can not pass it to Safari since it does not share session info and cookies with my app's WKWebView.

Therefore, I would like to know if there is any opening in handling files in iOS WKWebView. Thank you.

Martensite answered 21/2, 2018 at 10:14 Comment(1)
Any workaround ?Pumice

© 2022 - 2024 — McMap. All rights reserved.