Skip to content

Commit

Permalink
Solve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
HectorNarvaez committed Jun 21, 2023
1 parent 40c23f4 commit 9af6839
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import com.omh.android.storage.api.domain.usecase.GetFilesListUseCaseParams
import com.omh.android.storage.api.domain.usecase.GetFilesListUseCaseResult
import com.omh.android.storage.api.domain.usecase.OmhResult
import com.omh.android.storage.api.domain.usecase.UploadFileUseCase
import com.omh.android.storage.api.domain.usecase.UploadFileUseCaseParams
import com.omh.android.storage.api.domain.usecase.UploadFileUseCaseResult
import java.io.File

abstract class OmhStorageClient protected constructor(
protected val authClient: OmhAuthClient
Expand Down Expand Up @@ -58,7 +61,16 @@ abstract class OmhStorageClient protected constructor(
}
}

fun deleteFile() = DeleteFileUseCase(getRepository())

fun uploadFile() = UploadFileUseCase(getRepository())
fun uploadFile(
localFileToUpload: File,
fileName: String,
parentId: String?
): OmhTask<UploadFileUseCaseResult> {
val uploadFileUseCase = UploadFileUseCase(getRepository())
return OmhStorageTaskImpl {
val parameters = UploadFileUseCaseParams(localFileToUpload, fileName, parentId)
val result = uploadFileUseCase(parameters)
result
}
}
}

0 comments on commit 9af6839

Please sign in to comment.