request-input-bundle icon indicating copy to clipboard operation
request-input-bundle copied to clipboard

`multipart/form-data` `boundary` property is not supported

Open Alexandre-Fernandez opened this issue 2 years ago • 1 comments

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 ...
}

Alexandre-Fernandez avatar May 02 '23 09:05 Alexandre-Fernandez

Thanks for reporting. Unfortunately, that content type is not supported yet due to file upload. Feel free to push a PR to support that type.

sfmok avatar Mar 18 '24 21:03 sfmok