Minimal WhatsApp media upload/download client.
The session worker supplies IQ access through opts[:session]; this module
queries media_conn, uploads encrypted media bodies, and downloads encrypted
bodies that are later verified and decrypted by ExWapp.Media.Crypto.
Summary
Functions
Downloads encrypted media and returns the decrypted plaintext bytes.
Encrypts plaintext media and uploads it to the best available media host.
Functions
@spec download(map(), ExWapp.Media.Ref.t(), keyword()) :: {:ok, binary()} | {:error, term()}
Downloads encrypted media and returns the decrypted plaintext bytes.
@spec upload(map(), ExWapp.Media.media_type(), binary(), keyword()) :: {:ok, ExWapp.Media.Upload.t()} | {:error, term()}
Encrypts plaintext media and uploads it to the best available media host.