Postgresql binary format field in Phoenix/Ecto

to store uploaded files :bytea works for me:

   create table(:files) do
      add :data, :bytea
      timestamps
    end

 use App.Web :model
  schema "files" do
    field :data, :binary
    timestamps
  end
4 Likes