MailSlurpAPI.Api.AttachmentController.upload_multipart_form

You're seeing just the function upload_multipart_form, go back to MailSlurpAPI.Api.AttachmentController module for more information.
Link to this function

upload_multipart_form(connection, file, opts \\ [])

Specs

upload_multipart_form(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, [String.t()]} | {:error, Tesla.Env.t()}

Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused.

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • file (String.t): file
  • opts (KeywordList): [optional] Optional parameters
    • :content_type (String.t): Optional content type of attachment
    • :filename (String.t): Optional name of file
    • :x_filename (String.t): Optional content type header of attachment

      Returns

, ...]} on success {:error, info} on failure