Wax.CloudAPI.Media (wax v1.1.0)

Media managment via the Cloud API

Summary

Functions

Uploads an image to the Cloud API servers from binary data

Uploads an image to the Cloud API servers from the given path

Functions

upload_binary(binary_file_content, filename, auth)

@spec upload_binary(iodata(), String.t(), Wax.CloudAPI.Auth.t()) ::
  {:ok, Media.media_id()} | {:error, String.t()}

Uploads an image to the Cloud API servers from binary data

This returns the Media ID, which is required to send any type of media files in a message.

upload_from_path(file_path, auth)

@spec upload_from_path(Path.t(), Wax.CloudAPI.Auth.t()) ::
  {:ok, Media.media_id()} | {:error, String.t()}

Uploads an image to the Cloud API servers from the given path

This returns the Media ID, which is required to send any type of media files in a message.