So, as per the docs, this is how we upload a file in Symfony Live components. If we have to upload a file along with other input, how to do it?
Code from docs:
<p>
<input type="file" name="my_file" />
<button data-action="live#action" data-live-action-param="files|myAction" />
</p>
Example: I was able to do with
data-live-action-param="files|myAction"
Twig Component:
<div class="col">
{{ form_row(form.dialogues.album.album_id,{'attr':{'id' : 'album-id'}}) }}
{{ form_row(form.dialogues.images.image) }}
</div>
LiveComponent
$imageFile = $request->files->get('exam')['dialogues']['images']['image'];
$albumId = $request->request->get('exam')['dialogues']['album']['album_id'];
No doubt, $imageFile has no issue, but dd($albumId) says null. How to do this?