Assorted fixes.
[akkoma] / lib / pleroma / uploaders / uploader.ex
index 7380320af41cd2f5b4e71f1feb140a61a1abe714..b58fc6d713d1dfec501922242e7239e175ba4e2a 100644 (file)
@@ -6,7 +6,9 @@ defmodule Pleroma.Uploaders.Uploader do
   @doc """
   Put a file to the backend.
 
-  Returns a `String.t` containing the path of the uploaded file.
+  Returns `{:ok, String.t } | {:error, String.t} containing the path of the 
+  uploaded file, or error information if the file failed to be saved to the 
+  respective backend.
   """
   @callback put_file(
               name :: String.t(),
@@ -14,13 +16,5 @@ defmodule Pleroma.Uploaders.Uploader do
               file :: File.t(),
               content_type :: String.t(),
               should_dedupe :: Boolean.t()
-            ) :: String.t()
-
-  @callback put_file(
-              name :: String.t(),
-              uuid :: String.t(),
-              image_data :: String.t(),
-              content_type :: String.t(),
-              should_dedupe :: String.t()
-            ) :: String.t()
+            ) :: {:ok, String.t()} | {:error, String.t()}
 end