class BinariesService : ConnectionMultipartRequest<User, ByteArray>
Allows files to be uploaded/downloaded from Cumulocity using the /inventory/binaries api
data class Attachment
Wrapper for the content to uploaded/downloaded from Cumulocity |
|
inner class ResponseImpl : Response<BinariesService.Attachment> |
BinariesService(connection: CumulocityConnectionFactory.CumulocityConnection)
Creates a single use instance that can be used to fetch/send binary content to Cumulocity |
fun get(id: String, responder: (Response<BinariesService.Attachment>) -> Unit): Unit
Fetch file contents using Cumulocity internal id of the file |
|
fun path(): String |
|
fun send(name: String, contentType: String, content: ByteArray, responder: (Response<BinariesService.Attachment>) -> Unit): Unit
Sends the file to Cumulocity to be stored |