How to use mimeType Assert with VichUploader?
问题 This assert is passing Symfony's form validation when uploading any file with VichUploaderBundle: /** * @Vich\UploadableField(mapping="product_media", fileNameProperty="path") * @Assert\File( * mimeTypes = {"image/jpeg", "image/gif", "image/png", "video/mp4", "video/quicktime", "video/avi"}, * mimeTypesMessage = "Wrong file type (jpg,gif,png,mp4,mov,avi)" * ) * @var File $pathFile */ protected $pathFile; I cannot see what the problem is with the assert. How can I validate file types with