UploadRequest

data class UploadRequest(val id: String, val url: String, val filePath: String, val method: String = "POST", val headers: Map<String, String> = emptyMap())

Describes a file upload to be performed in the background.

val upload = UploadRequest(
id = "log-upload",
url = "https://api.example.com/upload",
filePath = "/data/files/logs.zip",
method = "POST",
headers = mapOf("Content-Type" to "application/octet-stream")
)
transferManager.upload(upload)

Parameters

id

Unique task identifier.

url

URL to upload to.

filePath

Local file path to upload.

method

HTTP method (POST, PUT).

headers

Optional HTTP headers.

Constructors

Link copied to clipboard
constructor(id: String, url: String, filePath: String, method: String = "POST", headers: Map<String, String> = emptyMap())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val id: String
Link copied to clipboard
Link copied to clipboard
val url: String