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)Content copied to clipboard
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.