Allow uploading images (#13)
Adds an optional field for the post image. Fixes #12 Co-authored-by: clfreville2 <clement.freville2@etu.uca.fr> Reviewed-on: https://codefirst.iut.uca.fr/git/clement.freville2/herbarium/pulls/13 Reviewed-by: Bastien OLLIER <bastien.ollier@noreply.codefirst.iut.uca.fr>
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Entity\Post;
|
||||
use App\Entity\Species;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\FileType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
@@ -20,6 +21,7 @@ class PostType extends AbstractType
|
||||
->add('latitude')
|
||||
->add('longitude')
|
||||
->add('altitude')
|
||||
->add('imageFile', FileType::class)
|
||||
->add('commentary')
|
||||
->add('species', EntityType::class, [
|
||||
'class' => Species::class,
|
||||
|
Reference in New Issue
Block a user