Inttegro.Files.CreateRequest (inttegro v0.2.0)

Copy Markdown View Source

Binary upload input for Inttegro.Files.create/3.

file_name is the client-visible name sent in the multipart request, bytes is the complete binary payload, and purpose selects the server-side file policy. custom_data values must be strings. For large inputs, account for the fact that this SDK currently holds the payload in memory while constructing the multipart request.

Summary

Types

t()

The bytes and metadata needed to create a file.

Functions

Builds an upload request and raises KeyError when a required field is missing.

Types

t()

@type t() :: %Inttegro.Files.CreateRequest{
  bytes: binary(),
  custom_data: %{optional(String.t()) => String.t()} | nil,
  file_name: String.t(),
  purpose: String.t(),
  title: String.t() | nil
}

The bytes and metadata needed to create a file.

Functions

new!(attrs)

@spec new!(map() | keyword()) :: t()

Builds an upload request and raises KeyError when a required field is missing.