Skip to content

multipart/form-data boundary property is not supported #14

@Alexandre-Fernandez

Description

@Alexandre-Fernandez
The content-type "multipart/form-data; boundary=--------------------------580848852863824060235695" is not supported. 
Supported MIME types are "application/json", "application/x-json", "text/xml", "application/xml", "application/x-xml", "application/x-www-form-urlencoded", "multipart/form-data".

I get this error when trying to post a file with VSCode's thunder client.

image

This is the DTO :

final class FormDataDto implements InputInterface
{
    #[Assert\NotBlank]
    private string $id;

    private string $type; 

    #[Assert\File(
        maxSize: '5120k',
        extensions: ['pdf'],
        extensionsMessage: 'Please upload a valid PDF',
    )]
    private ?File $attachement = null;
    
    // getters and setters ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions