Skip to content

Commit b15e01e

Browse files
authored
docs: add note on using PUT method to upload files (#1509)
1 parent b7a111e commit b15e01e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/file-upload.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ resource (in our case: `Book`).
4242
This example will use a custom controller to receive the file.
4343
The second example will use a custom `multipart/form-data` decoder to deserialize the resource instead.
4444

45+
**Note**: Uploading files won't work in `PUT` or `PATCH` requests, you must use `POST` method to upload files.
46+
See [the related issue on Symfony](https://github.com/symfony/symfony/issues/9226) and [the related bug in PHP](https://bugs.php.net/bug.php?id=55815) talking about this behavior.
47+
4548
### Configuring the Resource Receiving the Uploaded File
4649

4750
The `MediaObject` resource is implemented like this:

0 commit comments

Comments
 (0)