[ https://issues.apache.org/jira/browse/CB-2425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah updated CB-2425: --------------------------------- Component/s: (was: Plugin File) Plugin File Transfer > 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 > Assignee: Joe Bowser > 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.1.5#6160)