projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'user-follow-all-unique' into 'develop'
[akkoma]
/
lib
/
pleroma
/
mime.ex
diff --git
a/lib/pleroma/mime.ex
b/lib/pleroma/mime.ex
index 99063ded6780b4583909f7fd06378076c500ddd8..84fb536e0630644f94e492302ae34333eaec096e 100644
(file)
--- a/
lib/pleroma/mime.ex
+++ b/
lib/pleroma/mime.ex
@@
-1,3
+1,7
@@
+# 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.
defmodule Pleroma.MIME do
@moduledoc """
Returns the mime-type of a binary and optionally a normalized file-name.
@@
-33,10
+37,10
@@
defmodule Pleroma.MIME do
{:ok, check_mime_type(head)}
end
{:ok, check_mime_type(head)}
end
- def mime_type(<<_::binary>>), do: {:ok, @default}
-
def bin_mime_type(_), do: :error
def bin_mime_type(_), do: :error
+ def mime_type(<<_::binary>>), do: {:ok, @default}
+
defp fix_extension(filename, content_type) do
parts = String.split(filename, ".")
defp fix_extension(filename, content_type) do
parts = String.split(filename, ".")