Commit 674efb0a authored by lain's avatar lain
Browse files

Merge branch 'features/mediatype-mime-valid' into 'develop'

transmogrifier: MIME.valid?/1 for mediaType

See merge request !2634
parents d1924926 fe1cb56f
Pipeline #26986 passed with stages
in 57 minutes and 51 seconds
......@@ -221,9 +221,9 @@ def fix_attachments(%{"attachment" => attachment} = object) when is_list(attachm
media_type =
cond do
is_map(url) && is_binary(url["mediaType"]) -> url["mediaType"]
is_binary(data["mediaType"]) -> data["mediaType"]
is_binary(data["mimeType"]) -> data["mimeType"]
is_map(url) && MIME.valid?(url["mediaType"]) -> url["mediaType"]
MIME.valid?(data["mediaType"]) -> data["mediaType"]
MIME.valid?(data["mimeType"]) -> data["mimeType"]
true -> nil
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment