MultiPartData
Represents a multipart object containing a file plus metadata to be processed during upload.
-
The ‘name’ to be used on the request.
Declaration
Swift
public var name: String
-
The ‘filename’ to be used on the request.
Declaration
Swift
public var filename: String
-
The ‘MIME type’ to be used on the request.
Declaration
Swift
public var mimeType: String
-
The actual data to be sent.
Declaration
Swift
public var data: NSData
-
Initialize a multipart object using an NSURL and a corresponding MIME type.
Declaration
Swift
public init(url: NSURL, mimeType: String)
Parameters
url
the url of the local file.
mimeType
the MIME type.
Return Value
the newly created multipart data.
-
Initialize a multipart object using an NSData plus metadata.
Declaration
Swift
public init(data: NSData, name: String, filename: String, mimeType: String)
Parameters
data
the actual data to be uploaded.
name
the ‘name’ to be used on the request.
filename
the ‘filename’ to be used on the request.
mimeType
the ‘MIME type’ to be used on the request.
Return Value
the newly created multipart data.