Send file from web app to WKWebView

Which options do I have to send files from a web app to the ios native container?

I assume WKScriptMessage can only contain strings and I guess some files could be converted to base64. Is there a limit on the size of a message?

I guess another option could be to run a local web server but base64 seems to work quite well.

Thanks!

Send file from web app to WKWebView
 
 
Q