Skip to content

Commit

Permalink
chore: Add method in UploadManager to get an UploadSession by its UUID
Browse files Browse the repository at this point in the history
  • Loading branch information
tevincent committed Dec 11, 2024
1 parent 04c6192 commit c2f50d1
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@ class UploadManager(
return@withContext uploadController.getUploadByUUID(uploadSession.uuid)
}

@Throws(
RealmException::class,
CancellationException::class,
NotFoundException::class,
)
fun getUploadByUUID(uuid: String): UploadSession {
return uploadController.getUploadByUUID(uuid) ?: throw NotFoundException("No uploadSession found in DB")
}

/**
* Uploads a chunk of data for a file in an upload session.
*
Expand Down

0 comments on commit c2f50d1

Please sign in to comment.