diff --git a/sample/file-upload/common/src/commonMain/kotlin/io/github/jan/supabase/common/UploadViewModel.kt b/sample/file-upload/common/src/commonMain/kotlin/io/github/jan/supabase/common/UploadViewModel.kt index a7e31268c..7fd8e9fb1 100644 --- a/sample/file-upload/common/src/commonMain/kotlin/io/github/jan/supabase/common/UploadViewModel.kt +++ b/sample/file-upload/common/src/commonMain/kotlin/io/github/jan/supabase/common/UploadViewModel.kt @@ -41,9 +41,10 @@ class UploadViewModel( file.dataProducer, file.path ?: file.name, file.getSize() ?: error("Invalid file"), - path, - true - ) + path + ) { + upsert = true + } uploads[upload.fingerprint] = upload uploadItems.value = uploadItems.value.map { if(it.fingerprint == upload.fingerprint) UploadState.Loaded(upload.fingerprint, upload.stateFlow.value) else it