The path or the content can't be used here. Use another path or smaller content.
Fil returns it with reason: :ebadpath for a path that escapes the disk root, before any adapter or plugin sees
it. Adapters return it for a file operation on a directory (:eisdir), a path under a file (:enotdir), a name
that's too long, and content over the storage's size limit. Plugins return it for content they refuse, such as
Fil.Plugin.Thumbnails for a file that isn't an image ({:not_an_image, message}). Fil.LiveView returns it with
reason: :extension for an upload whose path has an extension the upload doesn't accept, before anything is
written, and with reason: :too_large for a direct upload's file over the upload's max_file_size. Fil.Plug
answers an upload that fails with it with a 422, or a 404 when the path is the problem.
iex> disk = Fil.disk(adapter: Fil.Adapter.Memory)
iex> {:error, %Fil.InvalidRequestError{} = error} = Fil.read(disk, "../escape.txt")
iex> error.reason
:ebadpath
Summary
Types
@type t() :: %Fil.InvalidRequestError{ __exception__: term(), disk: Fil.Disk.t() | nil, op: Fil.Op.name() | nil, path: String.t() | nil, reason: term() }