exfile v0.3.0 Exfile.Ecto.FileTemplate
A module to help you define an Ecto.Type
backed by a custom backend.
Example:
defmodule MyApp.User.ProfilePicture do
use Exfile.Ecto.File, backend: "profile_pictures"
end
defmodule MyApp.User do
use Ecto.Schema
schema "users" do
field :profile_picture, MyApp.User.ProfilePicture
end
end
This will store any files assigned to the profile_picture
field of MyApp.User
in the backend configured as “profile_pictures”.