Dear Community,

I've now implemented a WebExtension and I must say it's a really
powerful and coder-friendly layer.

I am now struggling to access files that GeckoView downloads (like PDFs)
so that I can re-upload these to my server.

For this I have implemented *onExternalResponse*(GeckoSession session,
GeckoSession.WebResponseInfo response) as James Willcox has pointed out.

However, from the *GeckoSession.WebResponseInfo response* object I can
only see the original URl of the Download file, not the data stream itself.

I would need access to the actual file data.

In the geckoview_example codebase I can see that to download the file
simply the response.uri and the userAgent are passed to DownloadManager.
I don't see how this is enough information for the download to occur
when there are POST requests not encapsulated in uri.

I would like to download this file myself to a local variable, but so
far I've only been able to extract the file's URl.

It was mentioned that GeckoWebExecutor could help here, but I don't see
any examples on how I can implement this in onExternalResponse to get
access to the file data.

Am I on the right track here, and is there an example of how to
implement this?

Warm regards!
Urs

_______________________________________________
mobile-firefox-dev mailing list
mobile-firefox-dev@mozilla.org
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to