Skip to content

Issue with Select multiple when posting as multipart/form-data #3

Description

@weierophinney

@weierophinney
@ezimuel

Hi there,

I am trying to POST some data with a file upload. The data contains a multi select field. All data is posted as multipart/form-data. However when I examine the $data at the server, it only has a single element object with the last element posted.

This is what the payload was...

------WebKitFormBoundaryYcAwJ85j9fSAXt0o
Content-Disposition: form-data; name="projDesc"

Haritha Gammana
------WebKitFormBoundaryYcAwJ85j9fSAXt0o
Content-Disposition: form-data; name="projCategory"

3002
------WebKitFormBoundaryYcAwJ85j9fSAXt0o
Content-Disposition: form-data; name="projStart"

2017-10-01
------WebKitFormBoundaryYcAwJ85j9fSAXt0o
Content-Disposition: form-data; name="projEnd"

2017-10-31
------WebKitFormBoundaryYcAwJ85j9fSAXt0o
Content-Disposition: form-data; name="applSeason"

1: '1'
------WebKitFormBoundaryYcAwJ85j9fSAXt0o
Content-Disposition: form-data; name="applSeason"

3: '3'
------WebKitFormBoundaryYcAwJ85j9fSAXt0o
Content-Disposition: form-data; name="projObjectives"

objective One
------WebKitFormBoundaryYcAwJ85j9fSAXt0o
Content-Disposition: form-data; name="projProposal"; filename=""
Content-Type: application/octet-stream


------WebKitFormBoundaryYcAwJ85j9fSAXt0o
Content-Disposition: form-data; name="createdOn"

2017-10-12 14:40:5
------WebKitFormBoundaryYcAwJ85j9fSAXt0o
Content-Disposition: form-data; name="createdBy"

user
------WebKitFormBoundaryYcAwJ85j9fSAXt0o--

And this is what the server $Data has

[12-Oct-2017 10:57:06 Europe/Berlin] Params is a:11:{s:8:"projDesc";s:15:"Haritha Gammana";s:12:"projCategory";s:4:"3002";s:9:"projStart";s:10:"2017-10-01";s:7:"projEnd";s:10:"2017-10-31";s:10:"applSeason";s:6:"3: '3'";s:14:"projObjectives";s:13:"objective One";s:12:"projProposal";s:0:"";s:9:"createdOn";s:18:"2017-10-12 14:40:5";s:9:"createdBy";s:4:"user";s:10:"modifiedOn";N;s:10:"modifiedBy";N;}

Check the input var applSeason above
Is this a bug or am I doing something wrong?

Any help is much appriciated


Originally posted by @Channad at zfcampus/zf-content-negotiation#90

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions