I have a Liveview with a form where the user makes a couple choices and then on submit the form shoots a post request over to a standard controller
to handle the download. I have a case
statement in the controller
:download
action that sends the download when it is created successfully, this works fine. I can't figure out how to keep the other :error
case from redirecting away from the Liveview though.
case get_report do
{:ok, csv} ->
conn
|> send_download({:binary, csv}, filename: "test.csv")
{:error, _msg} ->
do_something_pub_subby()
conn
|> ????
end