File upload fixes (#93)
Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -30,6 +30,7 @@ class StorageFileNameParser
|
||||
{
|
||||
if ($this->fileName && $this->extension) {
|
||||
$fileName = substr($this->fileName, 0, 50).'_'.$this->uuid.'.'.$this->extension;
|
||||
$fileName = preg_replace('#\p{C}+#u', '', $fileName); // avoid CorruptedPathDetected exceptions
|
||||
return mb_convert_encoding($fileName, 'UTF-8', 'UTF-8');
|
||||
}
|
||||
return $this->uuid;
|
||||
|
||||
Reference in New Issue
Block a user