[PSR-7] Error in mult-file upload code sample

43 views
Skip to first unread message

Florian Reuschel

unread,
May 10, 2020, 6:53:25 AM5/10/20
to PHP Framework Interoperability Group
This issue is very similar to [PSR-7] Files behavior wrong description (which has been fixed in the spec as far as I can tell):

The $_FILES code sample for

<input type="file" name="my-form[details][avatars][]" />

is inaccurate. It states that the according $_FILES structure looks like this:

array (
    'my-form' => array (
        'name' => array (
            'details' => array (
                'avatar' => array (
                    0 => 'my-avatar.png',
                    1 => 'my-avatar2.png',
                    2 => 'my-avatar3.png',
                    // ...

But according to the input name, the nested key should be avatars instead of avatar.

Or am I missing something?

Matthew Weier O'Phinney

unread,
May 13, 2020, 11:07:12 AM5/13/20
to php...@googlegroups.com
You're correct - please file an issue on the tracker to resolve this.

--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/d69c4ac9-6ed3-4279-9f68-7d70eb266b06%40googlegroups.com.


--
he/him
Reply all
Reply to author
Forward
0 new messages