corda / net.corda.core.node.services / FileUploader

FileUploader

interface FileUploader

An interface that denotes a service that can accept file uploads.

Functions

accepts abstract fun accepts(type: String): Boolean

Check if this service accepts this type of upload. For example if you are uploading interest rates this could be "my-service-interest-rates". Type here does not refer to file extentions or MIME types.

upload abstract fun upload(file: InputStream): String

Accepts the data in the given input stream, and returns some sort of useful return message that will be sent back to the user in the response.

Inheritors

AcceptsFileUpload interface AcceptsFileUpload : FileUploader

A service that implements AcceptsFileUpload can have new binary data provided to it via an HTTP upload.