add

fun add(key: String, value: Blob): Attachments.Builder(source)
fun add(key: String, value: File): Attachments.Builder(source)
fun add(key: String, value: FileList): Attachments.Builder(source)
fun add(key: String, value: ArrayBuffer): Attachments.Builder(source)
fun add(key: String, value: Int8Array): Attachments.Builder(source)
fun add(key: String, value: Uint8Array): Attachments.Builder(source)
fun add(key: String, value: Uint8ClampedArray): Attachments.Builder(source)
fun add(key: String, value: Int16Array): Attachments.Builder(source)
fun add(key: String, value: Uint16Array): Attachments.Builder(source)
fun add(key: String, value: Int32Array): Attachments.Builder(source)
fun add(key: String, value: Uint32Array): Attachments.Builder(source)
fun add(key: String, value: Float32Array): Attachments.Builder(source)
fun add(key: String, value: Float64Array): Attachments.Builder(source)
fun add(key: String, value: ImageData)(source)


fun add(key: String, value: Json, transferables: List<Any> = emptyList())(source)

Add raw JSON as an attachment.

Raw JSON attachment support is provided as an escape hatch if somehow we don't support a type that you need to send into our out of a web worker. Please consider filing a bug with the team so we can expand our API instead.

Also, be sure to review the web worker documentation to check that the values you are sending are supported as an accepted value (many are not!)

Parameters

transferables

If provided, this should be set to one or more object instances which ALSO exist somewhere inside the raw JSON object AND should be a transferable object.