Pleroma v1.1.9-10-g42f76306+dev Pleroma.MIME View Source

Returns the mime-type of a binary and optionally a normalized file-name.

Link to this section Summary

Link to this section Functions

Link to this function

bin_mime_type(arg1)

View Source
bin_mime_type(binary()) :: {:ok, String.t()} | :error
Link to this function

bin_mime_type(binary, filename)

View Source
Link to this function

file_mime_type(filename)

View Source
file_mime_type(String.t()) ::
  {:ok, content_type :: String.t(), filename :: String.t()}
  | {:error, any()}
  | :error
file_mime_type(String.t()) :: {:ok, String.t()} | {:error, any()} | :error
Link to this function

file_mime_type(path, filename)

View Source