[
https://issues.apache.org/jira/browse/CB-2425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Joe Bowser updated CB-2425:
---------------------------
Assignee: (was: Joe Bowser)
> FileUploadOptions options structure not very clean, means you can't have a
> form field called 'header'
> -----------------------------------------------------------------------------------------------------
>
> Key: CB-2425
> URL: https://issues.apache.org/jira/browse/CB-2425
> Project: Apache Cordova
> Issue Type: Improvement
> Components: Plugin File Transfer
> Affects Versions: 2.4.0
> Environment: Using FileUpload to post a multi-part form to the server.
> Reporter: Thomas O'Dell
> Priority: Minor
> Labels: features
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> The current design of FileUploadOptions is that the options is an object,
> whose fields represent the form fields. A special option 'headers' represents
> the headers to be uploaded.
> The format of the form fields is not compatible with JQuery and thus has to
> be massaged. As well, the design makes it impossible to have a form field
> called "headers".
> I propose the following format for the Options object (25 = 2.5.0, i.e. first
> release to support api change):
> { 'apache-cordova-25-form-fields': [
> {name: <name>, value: <value>},
> ...
> ], // i.e. format returned by JQuery's serializeArray(formObject)
> 'apache-cordova-25-header-fields': [
> {name: <name>, value: <value>},
> ...
> ],
> 'apache-cordova-25-upload-options': [
> {name: <name>, value: <value>}, // e.g. force chunked mode, set
> throttle speed
> ...
> ],
> <old-style options and headers>
> }
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]