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

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

Open
weierophinney opened this issue Dec 31, 2019 · 0 comments
Open

Comments

@weierophinney
Copy link
Contributor

@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

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

No branches or pull requests

1 participant