Fix content type and size missing for profile avatars
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
b34958d3af
commit
e991d7d373
|
@ -225,9 +225,9 @@ defmodule Mobilizon.GraphQL.Resolvers.Person do
|
||||||
end
|
end
|
||||||
|
|
||||||
defp save_picture(media, key) do
|
defp save_picture(media, key) do
|
||||||
with {:ok, %{name: name, url: url, content_type: content_type, size: _size}} <-
|
with {:ok, %{name: name, url: url, content_type: content_type, size: size}} <-
|
||||||
Upload.store(media.file, type: key, description: media.alt) do
|
Upload.store(media.file, type: key, description: media.alt) do
|
||||||
%{"name" => name, "url" => url, "mediaType" => content_type}
|
%{"name" => name, "url" => url, "content_type" => content_type, "size" => size}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue