ionic-team / ionic-team/capacitor-os-inappbrowser

Add listner for attachment download

Open
#82 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
13
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Hi there!

I wanted to reach out to see if it would be possible to implement a listener for downloads specifically for headers that have the Content-Disposition set to attachment (for openInWebView).

It would be great to intercept those requests and manage them using @capacitor/filesystem and @capacitor/file-transfer (or download them via inappbrowser). If the header is set to "inline," the inappbrowser attempts to display the file, but what I really need is to download it (excel, word documents, etc).

Something similar to what Cordova offers with its [InAppBrowser - addEventListener](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/index.html#inappbrowseraddeventlistener).

I've tried using the browserPageNavigationCompleted event, but unfortunately, it doesn't trigger in these cases.

Thank you so much for considering this!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.