upload
//fluxbase-kotlin/io.github.nimbleflux.fluxbase.storage/StorageBucket/upload
upload
Section titled “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.
Parameters
Section titled “Parameters”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. |