Back to Alamofire

Uploadable

docs/Classes/UploadRequest/Uploadable.html

5.12.0966 B
Original Source

Uploadable

public enum Uploadable : @unchecked Sendable
extension UploadRequest.Uploadable: UploadableConvertible

Type describing the origin of the upload, whether Data, file, or stream.

`

                data(_:)
                `

Upload from the provided Data value.

Declaration

Swift

case data(Data)

`

                file(_:shouldRemove:)
                `

Upload from the provided file URL, as well as a Bool determining whether the source file should be automatically removed once uploaded.

Declaration

Swift

case file(URL, shouldRemove: Bool)

`

                stream(_:)
                `

Upload from the provided InputStream.

Declaration

Swift

case stream(InputStream)

`

                createUploadable()
                `

Declaration

Swift

public func createUploadable() throws -> UploadRequest.Uploadable