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")

}
  • url

    The url.

    Declaration

    Swift

    var url: URL { get }
  • asRequest() Extension method

    Creates a UploadRequest to retrieve the contents of a URL based on the specified Requestable

    Declaration

    Swift

    func asRequest() throws -> UploadRequest

    Return Value

    The created UploadRequest.