updateFile
fun StoreFileStreamWriter.Companion.updateFile(api: StoreApi, fileId: String, publicMeta: ByteArray, privateMeta: ByteArray, size: Long, inputStream: InputStream, streamController: StoreFileStream.Controller? = null): String
Updates existing file and writes data from passed InputStream.
Return
Updated file ID
Parameters
api
reference to Store API
fileId
ID of the file to update
publicMeta
new public metadata for the matching file
privateMeta
new private (encrypted) metadata for the matching file
size
size of data to write
inputStream
stream with data to write to the file using optimal chunk size StoreFileStream.OPTIMAL_SEND_SIZE
streamController
controls the process of writing file
Throws
if there is an error while reading stream or this
is closed
when storeApi
is not initialized or there's no connection
if there is an error while updating Store file metadata
if there is an unknown error while updating Store file metadata