cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bas Bosman (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-2425) FileUploadOptions options structure not very clean, means you can't have a form field called 'header'
Date Thu, 30 Jan 2014 15:24:10 GMT

     [ https://issues.apache.org/jira/browse/CB-2425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Bas Bosman updated CB-2425:
---------------------------

    Component/s:     (was: CordovaJS)
                     (was: Android)
                     (was: iOS)
                 Plugin File

> 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
>    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)

Mime
View raw message