Skip to content

Error when submitting form with empty file input #83

Closed
@benjaminjonard

Description

@benjaminjonard

Hello,

I'm not sure if i'm posting on the right repository but I have an error when submitting a form with an empty file input:

RuntimeException: Cannot retrieve stream due to upload error in /ppm/vendor/react/http/src/Io/UploadedFile.php:85
Stack trace:
#1 /ppm/vendor/php-pm/httpkernel-adapter/Bridges/HttpKernel.php(162): React\Http\Io\UploadedFile->getStream()

It seems to happen because when submitting the form, browsers send the following param for the file:
Content-Disposition: form-data; name="author[photo]"; filename="" Content-Type: application/octet-stream

Any idea on how to fix this ?
Thanks

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