apache / apache/cordova-plugin-inappbrowser

ASPX files

Open
#498 15 comments 0 reactions 0 assignees View on GitHub
support
Dominant language
Java
Stars
1.1k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

It seems the plugin does not interpret/deals with correctly with ASPX files

In the app I'm developing, I forward the the user to a `plugin-inappbrowser` browser with target set as `_blank`, wherein he follows a series of steps (wherein several events `loadstart` are fired), till a point where he shall download a PDF file (that's how it behaves in a normal browser or with target set as `_system`). I know how to [download a pdf file][1], but the url is returning a ASPX file.

How to make the `inappbrowser` plugin correctly deal with ASPX files?

var inAppBrowserRef = cordova.InAppBrowser.open('https://someurl.com', '_blank', options)

inAppBrowserRef.addEventListener('loadstart', loadStartCallbackFunction)

function loadStartCallbackFunction (event) {
console.log('Authentication Window start loading')

// get the last step where the pdf file is downloaded
if (event.url.split('/').pop() === 'DocumentSigning.aspx') {
console.log('downloading pdf...')
// don't know what to do with this to make it download the pdf
}
}

In normal browser behaviour the PDF file downloading should be triggered, but nothing happens

[1]: https://stackoverflow.com/questions/33896026/cordova-ionic-download-file-from-inappbrowser

Contributor guide

Open the contributing guide

Research direction

Start with the cordova.InAppBrowser.open call and its loadstart event handler, comparing the reported _blank flow with the _system behavior for DocumentSigning.aspx. Confirm the plugin's expected behavior for the ASPX response and PDF download, then reproduce the issue in a minimal app before determining whether a documented limitation or a plugin change is needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.