MultipartFile

public class MultipartFile : Encodable

Represents a file to be sent through a multipart/form-data request.

Warning

Even tough the class is Encodable, it is supposed to be encoded with MultipartFormDataEncoder. Encoding with a different encoder will result in an undefined result.
  • url

    The URL of the file to upload.

    Declaration

    Swift

    public let url: URL
  • Creates a new MultipartFile.

    Declaration

    Swift

    public init(url: URL)

    Parameters

    url

    The URL of the file to upload.