apache / apache/cordova-plugin-file-transfer
File Download Redirect URLs not setting a cookie while in Android platform while it sets it in IoS
- Dominant language
- JavaScript
- Stars
- 606
- Forks
- 874
- PR merge metrics
- No merged PRs in 30d
Description
# Bug Report
## Problem
We are using file transfer plugin 1.6.3 for our hybrid ionic app. When we try to download a file from a redirect PDF URL , it doesn't download on the Android platform while it works from the ios platform.
Upon investigation we found that in IoS, the url we use to download creates a cookie, its validated for authentication and redirects to the correct PDF url, while the same url isnt creating a cookie so the url is denied access to the redirect url.
### What is expected to happen?
When we use the redirect url for downloading PDF in Android, it should create a cookie (basically like a browser) and sent it along with the redirect URL.
### What does actually happen?
In Android , the cookie isnt getting set for the redirect URL, so the request is denied.
## Information
### Command or Code
### Environment, Platform, Device
Issue is in Android Platform
### Version information
Ionic version: 5.4.13
Android : 8
## Checklist
- [x] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
Contributor guide
Research direction
No source file, test, command, or reproducible code is named. Start by inspecting the plugin's Android redirect and cookie handling, then compare it with the iOS behavior using the reported redirect PDF URL; done means Android retains the authentication cookie and downloads the PDF.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, ios, javascript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100