Add chunked uploads (Resumable curently broken)

This commit is contained in:
2026-04-14 16:39:43 +02:00
parent 8ae5dfc483
commit 6065b4d95f
8 changed files with 428 additions and 84 deletions

View File

@@ -2,6 +2,7 @@ package util
import (
"fmt"
"math/rand"
"strings"
)
@@ -41,3 +42,12 @@ func SafeFilename(name string) string {
}
return string(out)
}
func RandomString(n int) string {
const letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
b := make([]byte, n)
for i := range b {
b[i] = letters[rand.Intn(len(letters))]
}
return string(b)
}