corda / net.corda.node.services.api / AcceptsFileUpload

# AcceptsFileUpload

`interface AcceptsFileUpload : FileUploader`

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

TODO: In future, also accept uploads over the MQ interface too.

### Properties

acceptableFileExtensions | `abstract val acceptableFileExtensions: List<String>` What file extensions are acceptable for the file to be handed to upload()
dataTypePrefix | `abstract val dataTypePrefix: String` A string that prefixes the URLs, e.g. "attachments" or "interest-rates". Should be OK for URLs.

### Functions

accepts | `open fun accepts(prefix: 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.

### Inherited Functions

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

NodeAttachmentService | `class NodeAttachmentService : AttachmentStorage, AcceptsFileUpload` Stores attachments in the specified local directory, which must exist. Doesn't allow new attachments to be uploaded.