Skip to content
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

[CB-861] Header support for FileTransfer download #20

Closed
wants to merge 2 commits into from

Conversation

devgeeks
Copy link
Member

Added support for an optional options object as the final arg. Currently only handles the options.headers object (as per the issue).

FileTransfer.download(source, target, successCallback, errorCallback, trustAllHosts, options)

This is needed for using FileTransfer.download with Basic Authentication, etc. Sadly since Android 2.x doesn't support XHR2, this is needed in FileTransfer.

I have only added support to Android and iOS (see other PR's). It might be that the JS args need to be in a different order or handled differently so that it doesn't impact the other platforms. I am hoping I can get advice on that from someone.

If there is anything else I need to do, just let me know.

//cc @agrieve - for suggesting I do this myself

Added support for an optional options object as the final arg. Currently only handles the options.headers object (as per the issue).

`FileTransfer.download(source, target, successCallback, errorCallback, trustAllHosts, options)`

This is needed for using FileTransfer.download with Basic Authentication, etc. Sadly since Android 2.x doesn't support XHR2, this is needed in FileTransfer.

I have only added support to Android and iOS (see other PR's).
@@ -397,6 +398,7 @@ - (void)download:(CDVInvokedUrlCommand*)command
delegate.objectId = objectId;
delegate.source = sourceUrl;
delegate.target = filePath;
// delegate.headers = headers;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I wasn't sure about that one. All the other parameters were being passed to the delegate.

Deleted a commented out delegate reference and re-ordered the args to match the re-ordered js as discussed with @agrieve
@devgeeks devgeeks closed this Feb 28, 2013
@devgeeks devgeeks deleted the CB-861 branch February 28, 2013 19:30
khawkins added a commit to khawkins/cordova-ios that referenced this pull request Jun 4, 2014
Fixing iOS 7.1 errors (64-bit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants