save

abstract fun save(data: ByteArray, fileName: String, contentType: String, fileId: String?, confirmed: Boolean): String

Saves the given data as a file with the specified properties.

Return

The unique identifier of the saved file.

Parameters

data

The byte array containing the file data.

fileName

The name of the file.

contentType

The content type of the file.

fileId

(optional) The unique identifier of the file. If not provided, a new identifier will be generated.

confirmed

Specifies whether the file should be confirmed after saving.

Throws

if an I/O error occurs while saving the file.