FileUploadable
public protocol FileUploadable : Uploadable
Represents a FileUploadable
for Alamofire.
Create custom FileUploadable
protocol HTTPBinUploadService: FileUploadable {
typealias Response = Data
var path: String? = "post"
let url: URL = FileManager.url(forResource: "rainbow", withExtension: "jpg")
}
-
The url.
Declaration
Swift
var url: URL { get }
-
asRequest()
Extension methodCreates a
UploadRequest
to retrieve the contents of a URL based on the specifiedRequestable
Declaration
Swift
func asRequest() throws -> UploadRequest
Return Value
The created
UploadRequest
.