pleroma-elixir-captcha/lib/captcha.ex
2019-12-27 13:23:38 +07:00

9 lines
219 B
Elixir

defmodule Captcha do
def get() do
case System.cmd(Application.app_dir(:captcha, "priv/captcha"), []) do
{<<text::bytes-size(5), img::binary>>, 0} -> {:ok, text, img}
_other -> :error
end
end
end