bamboo v1.3.0 Bamboo.Attachment View Source

Link to this section Summary

Functions

Creates a new Attachment

Link to this section Types

Link to this type

t() View Source
t() :: %Bamboo.Attachment{
  content_type: nil | String.t(),
  data: nil | binary(),
  filename: nil | String.t(),
  path: nil | String.t()
}

Link to this section Functions

Creates a new Attachment

Examples:

Bamboo.Attachment.new("/path/to/attachment.png")
Bamboo.Attachment.new("/path/to/attachment.png", filename: "image.png")
Bamboo.Attachment.new("/path/to/attachment.png", filename: "image.png", content_type: "image/png")
Bamboo.Attachment.new(params["file"]) # Where params["file"] is a %Plug.Upload