Open
Description
As live actions are treated as regular controller actions, they should also support file responses.
#[LiveAction]
public function submit(): BinaryFileResponse
{
$this->validate();
return $this->file($this->exporter->generate($this->items));
}
Currently, file downloads are not downloaded but parsed..?

Edit (current workaround)
public function submit(UriSigner $uriSigner): Response
{
$this->validate();
$file = $this->exporter->generate($this->items)
$url = $this->generateUrl('admin_download', ['file' => base64_encode($file)]);
return $this->redirect($uriSigner->sign($url));
}
Metadata
Metadata
Assignees
Labels
No labels