You've already forked pocketbase
mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-11-06 09:29:19 +02:00
added extra extension length normalization
This commit is contained in:
@@ -177,6 +177,10 @@ func normalizeName(fr FileReader, name string) string {
|
||||
// try to detect the extension from the file content
|
||||
cleanExt, _ = detectExtension(fr)
|
||||
}
|
||||
if extLength := len(cleanExt); extLength > 20 {
|
||||
// keep only the last 20 characters (it is multibyte safe after the regex replace)
|
||||
cleanExt = "." + cleanExt[extLength-20:]
|
||||
}
|
||||
|
||||
// name
|
||||
// ---
|
||||
|
||||
Reference in New Issue
Block a user