Skip to content

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Jul 30, 2018

This is based on #37. I will rebase when it is merged.

We need to properly support field names like foo[] and foo[bar]. This PR will add such support.

'size' => filesize($tmpPath),
];

if (!preg_match('|([^\[]+)(?:\[([^\]]+)\])*(\[\])?|', $fieldName, $matches)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This regex is not good enough. It does not pick up "foo" in two[foo][bar][].

Any ideas for improved regex?

https://regex101.com/r/yyQorq/2

@Nyholm Nyholm force-pushed the support_multiple_upload_files branch from eb2b5de to 7c78e6e Compare July 30, 2018 07:46
@Nyholm Nyholm force-pushed the support_multiple_upload_files branch from 7c78e6e to 4b4dcf9 Compare July 30, 2018 08:43
@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 98.246% when pulling 4b4dcf9 on Nyholm:support_multiple_upload_files into 985bcac on PHPFastCGI:master.

@Nyholm Nyholm added this to the Release 0.11.0 milestone Jul 30, 2018
@AndrewCarterUK
Copy link
Member

Really nice - thanks!

Looks like a thorough test too!

@AndrewCarterUK AndrewCarterUK merged commit 73f1c92 into PHPFastCGI:master Jul 31, 2018
@Nyholm Nyholm deleted the support_multiple_upload_files branch August 1, 2018 06:43
@Nyholm
Copy link
Member Author

Nyholm commented Aug 1, 2018

Thank you

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

Successfully merging this pull request may close these issues.

3 participants