MultipartFormDataPartType
public enum MultipartFormDataPartType
Enum to specify multipart/form-data parameters that can be used in upload tasks.
-
Simple key-value case.
Declaration
Swift
case value(value: String)
Parameters
value
The value of the multipart/form-data parameter.
-
Data case.
Declaration
Swift
case data(data: Data, filename: String?, contentType: String?)
Parameters
data
The data to upload of the multipart/form-data parameter.
filename
The filename value of the multipart/form-data parameter.
contentType
The Content-Type of the multipart/form-data parameter.
-
URL case.
Declaration
Swift
case url(_: URL)
Parameters
file
The file URL that contains the data that will be uploaded.
filename
The filename value of the multipart/form-data parameter.
contentType
The Content-Type of the multipart/form-data parameter.