From c78f775f6ee85891024227718a7cf9264e95ac02 Mon Sep 17 00:00:00 2001 From: Alan Poulain Date: Mon, 20 Sep 2021 11:16:19 +0200 Subject: [PATCH] docs(admin): explain the better detection of file upload --- admin/file-upload.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/file-upload.md b/admin/file-upload.md index f4c8fc527ff..bcc0c974001 100644 --- a/admin/file-upload.md +++ b/admin/file-upload.md @@ -33,4 +33,6 @@ export default () => ( ``` And that's it! -You don't need to decorate the data provider if you are using the Hydra one: it detects that you have used a `FileInput` and uses a `multipart/form-data` request instead of a JSON-LD one. +The guessers are able to detect that you have used a `FileInput` and are passing this information to the data provider, through a `hasFileField` field in the `extraInformation` object, itself in the data. +If you are using the Hydra data provider, it uses a `multipart/form-data` request instead of a JSON-LD one. +In the case of the `EditGuesser`, the HTTP method used also becomes a `POST` instead of a `PUT`, to prevent a [PHP bug](https://bugs.php.net/bug.php?id=55815).