apache / cordova-plugin-file-transfer

Apache Cordova File Transfer Plugin
https://cordova.apache.org/
Apache License 2.0
596 stars 888 forks source link

[Android] Handle redirects when downloading a file (actual) #190

Closed jumangee closed 6 years ago

jumangee commented 6 years ago

Then FileTransfer download gets 301 or 302 redirect it storps and storing the HTML from that page instead of the target file. This adds a loop that detects redirect headers and continues following them until a non-redirect page is loaded.

Based on https://github.com/apache/cordova-plugin-file-transfer/pull/126

maverickmishra commented 6 years ago

With the new features introduced in XMLHttpRequest, this plugin is not needed any more. Migrating from this plugin to using the new features of XMLHttpRequest, is explained in this Cordova blog post.