Multipart.Part.file_field

You're seeing just the function file_field, go back to Multipart.Part module for more information.
Link to this function

file_field(path, name, headers \\ [], opts \\ [])

View Source

Specs

file_field(String.t(), name(), headers(), Keyword.t()) :: t()

Builds a form-data Part with a streaming file body.

Takes the following Keyword options in opts:

  • filename: controls the inclusion of the filename="foo" directive in the content-disposition header. Defaults to true, which uses the filename from the path on disk. Pass in a String to override this, or set to false to disable this directive.

  • content_type: controls the inclusion of the content-type header. Defaults to true which will use MIME.from_path/1 to detect the mime type of the file. Pass in a String to override this, or set to false to disable this header.