-
-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double enconding on Android #195
Labels
Comments
+1 |
Closed
Please try v2.0.7, it should be fixed now. You'll need to encode the base URL yourself whereas query parameters (second argument) will be encoded automatically. cordova.plugin.http.downloadFile(urlNotEncodedAutomatically, paramsObjectEncodedAutomatically, headers, filePath, successHandler, errorHandler); |
Closing this, feel free to open a new issue, if this won't solve your problem! |
Solved on Android, now it fails on iOS :( |
This was referenced Apr 7, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I am trying to download a file with a path like:
https://mydomain.com/file has spaces.pdf
I am obtaining this error:
{"status":-1,"error":"There was an error with the given filePath"}
If I do a previous 'encodeURI' the problem is that on Android the plugin do a double enconding for example:
https://mydomain.com/file%20has%20spaces.pdf
is transformed into
https://mydomain.com/file%2520has%2520spaces.pdf
On iOS it works correctly if I previously encode the urls
My version of the plugin is 2.0.4 and the ionic wrapper version is 4.18.0
What would be the problem?
Related issue:
#96
The text was updated successfully, but these errors were encountered: