+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.MIME do
@moduledoc """
Returns the mime-type of a binary and optionally a normalized file-name.
{:ok, check_mime_type(head)}
end
- def mime_type(<<_::binary>>), do: {:ok, @default}
-
def bin_mime_type(_), do: :error
+ def mime_type(<<_::binary>>), do: {:ok, @default}
+
defp fix_extension(filename, content_type) do
parts = String.split(filename, ".")