Symfony - Edyadmin 4 FileType ограничение на ImagefieldPhp

Кемеровские программисты php общаются здесь
Anonymous
Symfony - Edyadmin 4 FileType ограничение на Imagefield

Сообщение Anonymous »

Как я могу ограничить Imagefield только принять PNG и JPG?public function configureFields(string $pageName): iterable
{
return [
TextField::new('entryTitle'),
TextEditorField::new('entryText'),
AssociationField::new('entryCategory'),
ImageField::new('mainImage')
->setBasePath('uploads/images/Blog')
->setUploadDir('public/uploads/images/Blog')
->setUploadedFileNamePattern('[randomhash].[extension]')
->setHelp('Only .png and .jpg')
];
}


Подробнее здесь: https://stackoverflow.com/questions/746 ... imagefield

Вернуться в «Php»