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
urlthe url of the local file.
mimeTypethe 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
datathe actual data to be uploaded.
namethe ‘name’ to be used on the request.
filenamethe ‘filename’ to be used on the request.
mimeTypethe ‘MIME type’ to be used on the request.
Return Value
the newly created multipart data.
View on GitHub
MultiPartData Class Reference