You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Ivan Karpan (JIRA)" <ji...@apache.org> on 2014/12/09 11:35:12 UTC
[jira] [Created] (CB-8138) "download" parameters in documentation
are inconsistent with implementation
Ivan Karpan created CB-8138:
-------------------------------
Summary: "download" parameters in documentation are inconsistent with implementation
Key: CB-8138
URL: https://issues.apache.org/jira/browse/CB-8138
Project: Apache Cordova
Issue Type: Bug
Components: Plugin File Transfer
Affects Versions: 3.7.0
Environment: org.apache.cordova.file-transfer 0.4.7 "File Transfer"
Reporter: Ivan Karpan
According to documentation "download" action parameters are as follows (optional ones are marked [as such]):
* source
* target
* [trustAllHosts]
* [options]
https://github.com/apache/cordova-plugin-file-transfer/blob/master/doc/index.md#download
In iOS implementation the parameters are different:
* source
* target
* [trustAllHosts]
* downloadId
* [headers]
https://github.com/IvanKarpan/cordova-plugin-file-transfer/blob/master/src/ios/CDVFileTransfer.m#L366
I am no Android, Windows or WP developer but reading those platforms' implementations it seems like they all in fact require some sort of a download id at index 3.
All of this means that some of the plugin functionality cannot be used by users because they are misguided by documentation. It also means that there is a problem with arguments order, because "downloadId" is mandatory while "trustAllHosts" is not.
I will submit a pull request via github to update the documentation. If this is enough for the community we could leave it at that.
Otherwise it seems like how it should actually be done is as follows:
* source
* target
* download id
* [trustAllHosts]
* [headers]
I can/will easily do this for iOS and make necessary changes to the documentation although I will need some help to fix this/review my blindfolded fixes on other platforms.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org