X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fupload.ex;h=1be1a3a5b3e03c371b89549374b8cf9579187e0c;hb=58ccd2bbfd9ab589aba21c886b497979a43bc591;hp=440199d1907c0f350248c79f976a1b5733de4f56;hpb=4a45b96a91485a39f26bcc86b6cbd21d1547511e;p=akkoma
diff --git a/lib/pleroma/upload.ex b/lib/pleroma/upload.ex
index 440199d19..1be1a3a5b 100644
--- a/lib/pleroma/upload.ex
+++ b/lib/pleroma/upload.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Upload do
@@ -134,7 +134,7 @@ defmodule Pleroma.Upload do
end
end
- defp prepare_upload(%{"img" => "data:image/" <> image_data}, opts) do
+ defp prepare_upload(%{img: "data:image/" <> image_data}, opts) do
parsed = Regex.named_captures(~r/(?jpeg|png|gif);base64,(?.*)/, image_data)
data = Base.decode64!(parsed["data"], ignore: :whitespace)
hash = String.downcase(Base.encode16(:crypto.hash(:sha256, data)))