Protocol Enumerable not implemented for #Ecto.Changeset

Hey @gus
Sorry, I was out. Thanks for your kind response. Yes you’re absolutely right. After swaping these two lines it works.
But my basic problem which I’m facing from a long while is that when I call after_save function before Repo.insert then the message of {:ok, files} recieves and redirected the page.

%File{}
  |> File.changeset(file)
  |> Repo.insert()
  |> after_save(after_save)

But on the same spot when i call my after_save after Repo.insert then it does work and saves every uploaded image thumbnail but neither redirect to another page nor sends {:ok, files} message.

%File{}
    |> File.changeset(file)
    |> after_save(after_save)
    |> Repo.insert()

Kind Regards