Skip to content

upload

//fluxbase-kotlin/io.github.nimbleflux.fluxbase.storage/StorageBucket/upload

[jvm]
suspend fun upload(path: String, data: ByteArray, contentType: String = "application/octet-stream", upsert: Boolean = false, metadata: Map<String, String>? = null): FluxbaseResponse<UploadResult>

Upload a file (simple upload via POST multipart). Port of upload() in storage.ts:41.

jvm

path the object path within the bucket.
data the file content as a byte array.
contentType MIME type (default application/octet-stream).
upsert overwrite if the file already exists.