Issue Bug Closed

#100983Problem with file upload in extbase form

Sebastian Fischer 06/09/23, 08:30 updated 06/08/24, 08:05

Description

On the page https://www.startup-pitch.nrw/ i have multiple file uploads like this

<input required="required" accept="image/gif, image/jpeg, image/png, image/*" data-accept="image" class="custom-file-input" id="upload-portrait" style="opacity: 0" title="Lade dein Foto hoch *" type="file" name="tx_digreg_registration[newRegistrations][photo]">

I experience a problem with the extbase RequestBuilder::build. There a condition after the “// backwards compatibility” changes the $fileParameters from

$fileParameters = [
‘newRegistrations’ => [
‘photo’ => [
‘name’…..
]
]
]

into this

$fileParameters = [
‘photo’ => [
‘name’…..
]
]

which leads to an

$extbaseAttribute->arguments = [
‘newRegistrations’ => …
‘photo’ => …
]

By this the photo is not available as part of the Registrations $newRegistrations argument in the createAction.

Once i disabled the

$fileParameters = reset($fileParameters);

the photo is part of the newRegistrations argument and gets handles correctly in the controller.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.