Staged: http://wales.pgburton.com/
Switch to using multiple attr on the file upload input. This then adds arrays of info to the $_FILE array. As this is kind of janky; the array is an array of attributes which each then contain the attributes for multiple files.
e.g.
$out = [
'name' => [
'a',
'b'
],
'error' => [
0,
0
]
];
We don't like this as we can't loop easily over the different files.
Instead we simply pivot the table so it looks more like:
$out = [
0 => [
'name' => 'a',
'error' => 0
].
1 => [
'name' => 'b',
'error' => 0
].
];
Next we create an $out array which handles the success/error messages, as now we may want to have messages per uploaded file.