X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fuploaders%2Fuploader.ex;h=0af76bc593f4e69d245678686885cf7a5f32268e;hb=9f987dd017f352d63c7441e2cce301aea07082a8;hp=ce83cbbbc76584afdc0dc45de40e64b33f0cae2f;hpb=4c99b6d35abe2beb184a12f7cba6f84a0fc6a27a;p=akkoma diff --git a/lib/pleroma/uploaders/uploader.ex b/lib/pleroma/uploaders/uploader.ex index ce83cbbbc..0af76bc59 100644 --- a/lib/pleroma/uploaders/uploader.ex +++ b/lib/pleroma/uploaders/uploader.ex @@ -3,6 +3,8 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Uploaders.Uploader do + import Pleroma.Web.Gettext + @moduledoc """ Defines the contract to put and get an uploaded file to any backend. """ @@ -29,7 +31,6 @@ defmodule Pleroma.Uploaders.Uploader do * `{:error, String.t}` error information if the file failed to be saved to the backend. * `:wait_callback` will wait for an http post request at `/api/pleroma/upload_callback/:upload_path` and call the uploader's `http_callback/3` method. - """ @type file_spec :: {:file | :url, String.t()} @callback put_file(Pleroma.Upload.t()) :: @@ -67,7 +68,7 @@ defmodule Pleroma.Uploaders.Uploader do {:error, error} end after - 30_000 -> {:error, "Uploader callback timeout"} + 30_000 -> {:error, dgettext("errors", "Uploader callback timeout")} end end end