fix file name unicode issue (#28)

This commit is contained in:
Chirag
2022-11-15 15:37:07 +05:30
committed by GitHub
parent 0ef6e0cbdd
commit 0c0a9f1349
2 changed files with 11 additions and 1 deletions

View File

@@ -29,7 +29,8 @@ class StorageFileNameParser
public function getMovedFileName(): ?string
{
if ($this->fileName && $this->extension) {
return substr($this->fileName,0,50).'_'.$this->uuid.'.'.$this->extension;
$fileName = substr($this->fileName, 0, 50).'_'.$this->uuid.'.'.$this->extension;
return mb_convert_encoding($fileName, 'UTF-8', 'UTF-8');
}
return $this->uuid;
}