View Source Mobilizon.Web.Upload.MIME (Mobilizon v5.0.0-beta.1)

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

Summary

Functions

Link to this function

file_mime_type(filename)

View Source
@spec file_mime_type(String.t()) :: {:ok, String.t()} | {:error, :unknown_mime}
Link to this function

file_mime_type(path, filename)

View Source
@spec file_mime_type(String.t(), String.t()) ::
  {:ok, content_type :: String.t(), filename :: String.t()}
  | {:error, :unknown_mime | :failed_to_fix_extension}