Media type descriptors used by media crypto, upload, and download flows.
Summary
Functions
Infer a media type from a MIME type.
Return the descriptor for a media type.
Return the HKDF info string used for a media type.
Return the CDN upload path for a media type, or nil when that type does not
use the normal media CDN upload flow.
Types
@type media_type() ::
:image
| :video
| :audio
| :document
| :sticker
| :gif
| :ptt
| :ptv
| :thumbnail_link
| :product_catalog_image
| :md_app_state
| :md_msg_hist
| :product
| :thumbnail_document
| :thumbnail_image
| :thumbnail_video
| :payment_bg_image
| :ppic
| :biz_cover_photo
Functions
@spec from_mime(String.t()) :: media_type() | nil
Infer a media type from a MIME type.
@spec get(media_type()) :: descriptor()
Return the descriptor for a media type.
@spec hkdf_info(media_type()) :: String.t()
Return the HKDF info string used for a media type.
@spec path(media_type()) :: String.t() | nil
Return the CDN upload path for a media type, or nil when that type does not
use the normal media CDN upload flow.