File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ to make it look like this.
24
24
# api/config/packages/vich_uploader.yaml
25
25
vich_uploader :
26
26
db_driver : orm
27
-
27
+ metadata :
28
+ type : attribute
28
29
mappings :
29
30
media_object :
30
31
uri_prefix : /media
@@ -66,9 +67,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
66
67
use Symfony\C omponent\V alidator\C onstraints as Assert;
67
68
use Vich\UploaderB undle\M apping\A nnotation as Vich;
68
69
69
- /**
70
- * @Vich\Uploadabl e
71
- */
70
+ #[Vich\Uploadabl e]
72
71
#[ORM\E ntity]
73
72
#[ApiResource(
74
73
normalizationContext: ['groups' => ['media_object:read']],
@@ -109,9 +108,7 @@ class MediaObject
109
108
#[Groups(['media_object:read'])]
110
109
public ?string $contentUrl = null;
111
110
112
- /**
113
- * @Vich\Uploadabl eField(mapping="media_object", fileNameProperty="filePath")
114
- */
111
+ #[Vich\Uploadabl eField(mapping: "media_object", fileNameProperty: "filePath")]
115
112
#[Assert\N otNull(groups: ['media_object_create'])]
116
113
public ?File $file = null;
117
114
You can’t perform that action at this time.
0 commit comments