Skip to content

'Error 2' response when handling form-multipart file upload#9

@Dramacydal

Description

@Dramacydal

When sending form with one and only file input, mpcmf responds with text/plain 'Error 2'
If any other text input is added - error does not occur.

Looks like error comes from
vendor/react/http/src/Server.php:290:
image
which is called from
vendor\react\http\src\Server.php:187
image
Exception body here has message: array_merge(): Argument #2 is not an array

Request example:
Request headers:

Host: ****************** Connection: keep-alive Content-Length: 16774 Pragma: no-cache Cache-Control: no-cache Accept: application/json, text/javascript, */*; q=0.01 DNT: 1 X-Requested-With: XMLHttpRequest User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryTiLFo6nR9Bo7ppsc Origin: https://************* Sec-Fetch-Site: same-origin Sec-Fetch-Mode: cors Sec-Fetch-Dest: empty Referer: https://************* Accept-Encoding: gzip, deflate, br Accept-Language: en,en-US;q=0.9,ru-RU;q=0.8,ru;q=0.7 Cookie: ***************** 

Form data:

------WebKitFormBoundaryTiLFo6nR9Bo7ppsc Content-Disposition: form-data; name="upload_file"; filename="Импорт клиентов_18.05.2020.xlsx" Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ------WebKitFormBoundaryTiLFo6nR9Bo7ppsc-- 

Response:

Error 2 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions