Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/file-upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ use Vich\UploaderBundle\Mapping\Annotation as Vich;
new Get(),
new GetCollection(),
new Post(
inputFormats: ['multipart' => ['multipart/form-data']],
controller: CreateMediaObjectAction::class,
deserialize: false,
validationContext: ['groups' => ['Default', 'media_object_create']],
Expand Down Expand Up @@ -124,6 +125,7 @@ class MediaObject
}
}
```
Note: From V3.3 onwards, `'multipart/form-data'` must either be including in the global API-Platform config, either in `formats` or `defaults->inputFormats`, or defined as an `inputFormats` parameter on an operation by operation basis.

### Creating the Controller

Expand Down