Zf2 file upload by jQuery File Upload - file was n

2019-05-28 17:41发布

问题:

when I use jQuery File Upload I have error during ajax upload.

In controller:

$adapter = new \Zend\File\Transfer\Adapter\Http();
$adapter->isValid();

or

$adapter->receive();

Both methotds returns "File [file name] was not found"

dump from $_FILES:

Array
(
    [files] => Array
        (
            [name] => Penguins.jpg
            [type] => image/jpeg
            [tmp_name] => /tmp/phpwQoG2L
            [error] => 0
            [size] => 777835
        )

)

If I use move_uploaded_file in the same place all works

ZF2 v2.2.4

What is wrong?