mirror of
https://github.com/filegator/filegator.git
synced 2025-08-16 07:54:01 +02:00
fix for filename sanitize/cut
This commit is contained in:
@@ -137,15 +137,6 @@ class Tmpfs implements Service, TmpfsInterface
|
||||
);
|
||||
|
||||
// maximize filename length to 255 bytes http://serverfault.com/a/9548/44086
|
||||
$ext = pathinfo($filename, PATHINFO_EXTENSION);
|
||||
|
||||
return mb_strcut(
|
||||
pathinfo($filename, PATHINFO_FILENAME),
|
||||
0,
|
||||
255 - ($ext ? strlen($ext) + 1 : 0),
|
||||
(string) mb_detect_encoding($filename)
|
||||
).(
|
||||
$ext ? '.'.$ext : ''
|
||||
);
|
||||
return mb_substr($filename, 0, 255);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user