Phoenix hangs up when submitting a form?

Hi everyone! Please have a look and help to understand what’s going on. I am trying code below (without actually processing a file), but after clicking “Post” Phoenix just hangs for about 59-60 seconds.

Terminal show output similar to

[info] POST /
[info] Sent 302 in 13ms

But nothing happens in the browser (brave and chrome) for about 59-60 seconds. It just keeps loading.
I am probably missing a very obvious thing, tried to debug this myself for quite a while and at this point it’s better to ask for help. Appreciate any help.

  • {:phoenix, “~> 1.7.1”},
  • Elixir 1.14.3 (compiled with Erlang/OTP 25)


defmodule HelloWeb.PageController do
  use HelloWeb, :controller

  def home(conn, _params) do
    # The home page is often custom made,
    # so skip the default app layout.
    render(conn, :home, layout: false)

  def new(conn, _params) do
    render(conn, :new)

  def done(conn, _params) do
    render(conn, :done)

  def create(conn, _) do
    redirect(conn, to: ~p"/done")

new.html.heex file:

<.flash_group flash={@flash} />
<.header>Please choose a file (some.txt)</.header>
<br />
<.form :let={f} for={@conn} action={~p"/"} multipart>
  <%= Phoenix.HTML.Form.file_input(f, :some) %>
  <br />
  <br />
  <.button class="button">Post</.button>


scope "/", HelloWeb do
    pipe_through :browser

    get "/", PageController, :home
    get "/new", PageController, :new
    get "/done", PageController, :done
    post "/", PageController, :create
1 Like