Modified findUniqueFileName() in UploadWorker.kt to use a random 5-digit numeric hash rather than the previous 3-digit alphanumeric hash

This commit is contained in:
Alex Gailis 2024-10-22 12:17:21 +11:00
parent b353e8b1dc
commit 87fd4f5e5a
2 changed files with 1 additions and 10 deletions

View file

@ -547,9 +547,7 @@ class UploadWorker(
).blockingGet()) {
// Generate a random 5-character alphanumeric string
val randomHash = (1..3)
.map { chars[random.nextInt(chars.length)] }
.joinToString("")
val randomHash = (random.nextInt(90000) + 10000).toString()
sequenceFileName =
if (fileName.indexOf('.') == -1) {