downcase image_format

This commit is contained in:
byte[] 2019-11-16 22:15:26 -05:00
parent 664822dbd2
commit a4e189f51c

View file

@ -16,7 +16,7 @@ defmodule PhilomenaWeb.ImageView do
def thumb_url(image, show_hidden, name) do
%{year: year, month: month, day: day} = image.created_at
deleted = image.hidden_from_users
format = image.image_format
format = String.downcase(image.image_format)
root = image_url_root()
id_fragment =
@ -35,7 +35,7 @@ defmodule PhilomenaWeb.ImageView do
view = if download, do: "download", else: "view"
filename = "#{image.id}"
format = image.image_format
format = String.downcase(image.image_format)
"#{root}/#{view}/#{year}/#{month}/#{day}/#{filename}.#{format}"
end